Finding a curly quote in Word

J

jerem

I'm trying to do a search (Ctrl F) and look for terms that appears like this:
("Contracts") however the quote that is cloaking the word Contracts is a
curly quote and when I type in the Find What Box \("*"\) (which is
generically asking to find anything cloaked in quotes and parentheses using
wildcards), it will not do the search because it is looking for straight
quotes. When I looked on the ASCII list, I found ^34 as the code for a
straight quote, but could not find the ASCII code for a curly quote. Anyone
out there know what that code is???

To get around this I end up having to search out a term, copy it into the
Find What Box, crop out everything within the quotes just so that I can get
that curly quote in there but this is a pain in the neck. Any help would be
appreciated.

Thanks in advance
 
J

Jay Freedman

I'm trying to do a search (Ctrl F) and look for terms that appears like this:
("Contracts") however the quote that is cloaking the word Contracts is a
curly quote and when I type in the Find What Box \("*"\) (which is
generically asking to find anything cloaked in quotes and parentheses using
wildcards), it will not do the search because it is looking for straight
quotes. When I looked on the ASCII list, I found ^34 as the code for a
straight quote, but could not find the ASCII code for a curly quote. Anyone
out there know what that code is???

To get around this I end up having to search out a term, copy it into the
Find What Box, crop out everything within the quotes just so that I can get
that curly quote in there but this is a pain in the neck. Any help would be
appreciated.

Thanks in advance

The codes for curly double quotes are ^147 for the left quote and ^148 for the
right quote.

For future reference, ^34 will match both straight and curly quotes in an
ordinary non-wildcard Find, but you must use the specific codes for curly quotes
in a wildcard Find.
 
G

Greg Maxey

Jay,

This is a non-VBA observation, but I can enter the left curly quote in the
Find dialog using ALT+0147 but ALT+0148 fails to enter the right curry
quote.

Any ideas?

Thansk

--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org


McCain/Palin '08 !!!
 
J

jerem

Hi Jay
I've tried entering \(^147*^148\) in the Find What box with Wildcards,
however, it doesn't find anything at all. I see Greg's attempt and I'm going
to try that one as well - but any ideas why this is not working?
 
J

jerem

Jay and Greg:

I modified the finds to be:

\(^0147*^0148\) this works for curly quotes with Wildcards on

\(^34*34\) this works for straight quotes with Wildcards on

Thanks fellas
 
J

Jay Freedman

Hi Greg,

I dunno -- it works here, in both 2003 and 2007. Can you enter a curly quote in
body text that way?
 
G

Greg Maxey

Jay,

I know why now. I didn't have NUMLOCK on. For some reason ALT+0147 with
NUMLOCK off will still produce the left cury quote, but ALT+0148 won't
produce a right curly quote. I can create both with NUMLOCK on.



Jay said:
Hi Greg,

I dunno -- it works here, in both 2003 and 2007. Can you enter a
curly quote in body text that way?

--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org


McCain/Palin '08 !!!
 
G

Graham Mayor

The business of 0 in front of ASCII numbers actually seems a bit hit and
miss eg ^34 and ^034 both work, but ^147 does not while ^0147 does. I guess
I'll have to add another note to that section ;)

For the sake of completeness you can search for either type of quote with

[^34^0147]*[^34^0148]

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Greg Maxey

Graham,

Yes, and in a non-wildcard search:

'finds straight
'.Text = "^34*^34"
'finds curly
'.Text = "^0147*^0148"
'finds both
'.Text = """*"""
'or this finds both
.Text = Chr(34) & "*" & Chr(34)

where the "*" is a simple plain character in the document between the two
quotes.


Graham said:
The business of 0 in front of ASCII numbers actually seems a bit hit
and miss eg ^34 and ^034 both work, but ^147 does not while ^0147
does. I guess I'll have to add another note to that section ;)

For the sake of completeness you can search for either type of quote
with
[^34^0147]*[^34^0148]


Jay said:
Yeah, sorry about that.

The general description of codes used in wildcard searches is at
http://www.gmayor.com/replace_using_wildcards.htm. According to that
page, ^nnn should work as well as ^0nnn for characters in the ASCII
range 0 to 255. But I can confirm that ^147 doesn't find a curly
quote while ^0147 does.

--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org


McCain/Palin '08 !!!
 
J

Jay Freedman

Greg, that's just weird. I see the same thing, but I can't explain why the
left curly quote shows up!
 
K

Klaus Linke

The leading zero is for historical reasons. ASCII codes below 128 were
standardized a long time ago, but the upper 128 codes were used for
OS-specific, localized, or vendor-specific stuff.
In PC-Land, when DOS code pages were replaced by Windows code pages, the
leading zero indicated the difference.
Alt+147 still inserts (and ^147 still looks for) the character from the DOS
code page, probably
http://en.wikipedia.org/wiki/Code_page_437

Klaus


Graham Mayor said:
The business of 0 in front of ASCII numbers actually seems a bit hit and
miss eg ^34 and ^034 both work, but ^147 does not while ^0147 does. I
guess I'll have to add another note to that section ;)

For the sake of completeness you can search for either type of quote with

[^34^0147]*[^34^0148]

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Jay said:
Yeah, sorry about that.

The general description of codes used in wildcard searches is at
http://www.gmayor.com/replace_using_wildcards.htm. According to that
page, ^nnn should work as well as ^0nnn for characters in the ASCII
range 0 to 255. But I can confirm that ^147 doesn't find a curly
quote while ^0147 does.
 
G

Graham Mayor

Thanks for that, I'll incorporate it in the web page.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Klaus said:
The leading zero is for historical reasons. ASCII codes below 128 were
standardized a long time ago, but the upper 128 codes were used for
OS-specific, localized, or vendor-specific stuff.
In PC-Land, when DOS code pages were replaced by Windows code pages,
the leading zero indicated the difference.
Alt+147 still inserts (and ^147 still looks for) the character from
the DOS code page, probably
http://en.wikipedia.org/wiki/Code_page_437

Klaus


Graham Mayor said:
The business of 0 in front of ASCII numbers actually seems a bit hit
and miss eg ^34 and ^034 both work, but ^147 does not while ^0147
does. I guess I'll have to add another note to that section ;)

For the sake of completeness you can search for either type of quote
with [^34^0147]*[^34^0148]

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Jay said:
Yeah, sorry about that.

The general description of codes used in wildcard searches is at
http://www.gmayor.com/replace_using_wildcards.htm. According to that
page, ^nnn should work as well as ^0nnn for characters in the ASCII
range 0 to 255. But I can confirm that ^147 doesn't find a curly
quote while ^0147 does.

On Tue, 7 Oct 2008 19:18:01 -0700, jerem

Jay and Greg:

I modified the finds to be:

\(^0147*^0148\) this works for curly quotes with Wildcards on

\(^34*34\) this works for straight quotes with Wildcards on

Thanks fellas

:

On Tue, 7 Oct 2008 15:22:01 -0700, jerem
<[email protected]>
wrote:

I'm trying to do a search (Ctrl F) and look for terms that
appears like this: ("Contracts") however the quote that is
cloaking the word Contracts is a curly quote and when I type in
the Find What Box \("*"\) (which is generically asking to find
anything cloaked in quotes and parentheses using wildcards), it
will not do the search because it is looking for straight
quotes. When I looked on the ASCII list, I found ^34 as the
code for a straight quote, but could not find the ASCII code for
a curly quote. Anyone out there know what that code is???

To get around this I end up having to search out a term, copy it
into the Find What Box, crop out everything within the quotes
just so that I can get that curly quote in there but this is a
pain in the neck. Any help would be appreciated.

Thanks in advance

The codes for curly double quotes are ^147 for the left quote and
^148 for the
right quote.

For future reference, ^34 will match both straight and curly
quotes in an
ordinary non-wildcard Find, but you must use the specific codes
for curly quotes
in a wildcard Find.


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top