Help!

Search and Replace - help 5

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Formating Long Docs RSS
Next:  Problem with 2nd monitor viewing  
Author Message
Jackie
External


Since: Sep 07, 2005
Posts: 41



PostPosted: Thu Oct 20, 2005 6:23 am    Post subject: Search and Replace
Archived from groups: microsoft>public>word>formatting>longdocs (more info?)

Does anyone know if I can use search and replace to find text which is
shown in quotation marks, then make it bold?
Back to top
Jay Freedman
External


Since: Sep 16, 2003
Posts: 2367



PostPosted: Thu Oct 20, 2005 2:16 pm    Post subject: Re: Search and Replace [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jackie wrote:
> Does anyone know if I can use search and replace to find text which is
> shown in quotation marks, then make it bold?

Yes, someone knows. (Sorry, couldn't help it! <g>)

Use a wildcard search, explained at
http://www.gmayor.com/replace_using_wildcards.htm. That is, click the More
button in the Replace dialog and check the "Use wildcards" box.

If your document uses only straight quotation marks, then the Find
expression is simply

("*")

and the Replace expression is

\1

and press Ctrl+B in the Replace box so the label under it says "Font: Bold".
Then click the Replace All button.

If the document uses curly quotes -- what Word calls "smart quotes" although
they sometimes aren't so smart -- you can use those characters in the Find
expression either by copy/paste from the document or by typing in the ASCII
codes: hold the Alt key while typing on the number pad 0147 for an opening
quote and 0148 for a closing quote. That will give you the Find expression

("*")

Finally, if the document has a mixture of straight and curly quotes, you can
try changing them all in one go with the Find expression

([""]*[""])

If there are any unmatched pairs of quotes in the document, though, you
could wind up with a very large chunk of non-quotation text in bold. Just
remember that Undo will bring you back to the original state so you can fix
the incorrect quotation mark and try again.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Back to top
Suzanne S. Barnhill
External


Since: Sep 26, 2003
Posts: 24483



PostPosted: Thu Oct 20, 2005 2:44 pm    Post subject: Re: Search and Replace [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Generally speaking, " in the Find dialog will find either straight or curly
quotes.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jay Freedman" wrote in message

> Jackie wrote:
> > Does anyone know if I can use search and replace to find text which is
> > shown in quotation marks, then make it bold?
>
> Yes, someone knows. (Sorry, couldn't help it! <g>)
>
> Use a wildcard search, explained at
> http://www.gmayor.com/replace_using_wildcards.htm. That is, click the More
> button in the Replace dialog and check the "Use wildcards" box.
>
> If your document uses only straight quotation marks, then the Find
> expression is simply
>
> ("*")
>
> and the Replace expression is
>
> \1
>
> and press Ctrl+B in the Replace box so the label under it says "Font:
Bold".
> Then click the Replace All button.
>
> If the document uses curly quotes -- what Word calls "smart quotes"
although
> they sometimes aren't so smart -- you can use those characters in the Find
> expression either by copy/paste from the document or by typing in the
ASCII
> codes: hold the Alt key while typing on the number pad 0147 for an opening
> quote and 0148 for a closing quote. That will give you the Find expression
>
> ("*")
>
> Finally, if the document has a mixture of straight and curly quotes, you
can
> try changing them all in one go with the Find expression
>
> ([""]*[""])
>
> If there are any unmatched pairs of quotes in the document, though, you
> could wind up with a very large chunk of non-quotation text in bold. Just
> remember that Undo will bring you back to the original state so you can
fix
> the incorrect quotation mark and try again.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
>
>
Back to top
Jay Freedman
External


Since: Sep 16, 2003
Posts: 2367



PostPosted: Thu Oct 20, 2005 6:38 pm    Post subject: Re: Search and Replace [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

At least in my recent experiments in Word 2003, that's true in the regular
Find but not in a wildcard search. In a document with mixed straight and
curly quotes, the " character in a wildcard Find will match only the
straight quotes.

This isn't the only difference. For example, wildcard searches are always
case-sensitive, and there's the whole issue of caret-symbols like ^p that
aren't valid in wildcards. So this wrinkle doesn't surprise me at all.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Suzanne S. Barnhill wrote:
> Generally speaking, " in the Find dialog will find either straight or
> curly quotes.
>
>
> "Jay Freedman" wrote in message
>
>> Jackie wrote:
>>> Does anyone know if I can use search and replace to find text which
>>> is shown in quotation marks, then make it bold?
>>
>> Yes, someone knows. (Sorry, couldn't help it! <g>)
>>
>> Use a wildcard search, explained at
>> http://www.gmayor.com/replace_using_wildcards.htm. That is, click
>> the More button in the Replace dialog and check the "Use wildcards"
>> box.
>>
>> If your document uses only straight quotation marks, then the Find
>> expression is simply
>>
>> ("*")
>>
>> and the Replace expression is
>>
>> \1
>>
>> and press Ctrl+B in the Replace box so the label under it says
>> "Font: Bold". Then click the Replace All button.
>>
>> If the document uses curly quotes -- what Word calls "smart quotes"
>> although they sometimes aren't so smart -- you can use those
>> characters in the Find expression either by copy/paste from the
>> document or by typing in the ASCII codes: hold the Alt key while
>> typing on the number pad 0147 for an opening quote and 0148 for a
>> closing quote. That will give you the Find expression
>>
>> ("*")
>>
>> Finally, if the document has a mixture of straight and curly quotes,
>> you can try changing them all in one go with the Find expression
>>
>> ([""]*[""])
>>
>> If there are any unmatched pairs of quotes in the document, though,
>> you could wind up with a very large chunk of non-quotation text in
>> bold. Just remember that Undo will bring you back to the original
>> state so you can fix the incorrect quotation mark and try again.
>>
>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP FAQ: http://word.mvps.org
Back to top
Jackie
External


Since: Sep 07, 2005
Posts: 41



PostPosted: Fri Oct 21, 2005 4:58 am    Post subject: Re: Search and Replace [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for this. I don't know if I'm missing something but it doesn't
work. I get a message saying "The replace with text contains a group
number which is out of range". My doc is all straight quotes.
Back to top
Jay Freedman
External


Since: Sep 16, 2003
Posts: 2367



PostPosted: Fri Oct 21, 2005 1:57 pm    Post subject: Re: Search and Replace [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jackie wrote:
> Thanks for this. I don't know if I'm missing something but it doesn't
> work. I get a message saying "The replace with text contains a group
> number which is out of range". My doc is all straight quotes.

In that case, use the expression

("*")

Be sure to include the parentheses -- the error message you got indicates
that you left them out.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Back to top
Jackie
External


Since: Sep 07, 2005
Posts: 41



PostPosted: Mon Oct 24, 2005 5:30 am    Post subject: Re: Search and Replace [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I did leave them out - thanks for your help, this works beautifully.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Formating Long Docs All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum