Macro to find names in [ ] and change to bold

D

dgulley

I have been using a Macro in WordPerfict to find city names inside [ ]
and change them to bold. I'm trying to reproduce this in MSWord 2004.
I could use a little help. doug58
 
E

Elliott Roper

I have been using a Macro in WordPerfict to find city names inside [ ]
and change them to bold. I'm trying to reproduce this in MSWord 2004.
I could use a little help. doug58

You don' need no steenkin' macros.
Find and replace with a little fancy footwork should do the job as long
as there are no other instances of [....]
Replace with style set to "strong" - a built-in character style that's
bold.
In more detail...
Find and replace with wildcards on.
Your search string should be /[(*)\]
Your replace string is \1, but you gotta add format > style.. to the
replace nonsense and choose "strong" from the list of styles you get
offered.

Explanation: [ needs a \ in front to tell Word you mean [ literally (it
has a meaning as a wildcard, and the \ disambiguates that)
* means any string of characters. The ( ) round the * makes the string
into a unit for replace. It is the first such unit, so that's what the
\1 in the replace field is for.

PS. I *did* test this, and it works.
 

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