Macro for Find Replace

T

Tim

I have a bank of 30 words that I need to run the find/replace function
on with in about 20 documents, but the trick is, I would like to be
able to do the "Find Next" on each word. Stated in a different way,
I would like to find the word "temperature" in the document and
change it with "temp" in specific places but not in others (by
using the find/next button) and when finished, I would like to go to
the next word. I do not want to do a "replace all" on these words.
This is in word 2004 using Mac 10.4.3.
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Tim:

Sorry, Word won't do that unless you do some complex programming.

What I would do is set the locations where you want the changes to occur to
a specific Style. You then nominate the word you want to find and the style
in which it is formatted.

You can then use Replace All, because the Find will find only those
instances that have the style you set in the Find box.

If you can't get that working, you will have to code a macro to do this. I
think you will find it quicker to do them one by one.

Cheers

I have a bank of 30 words that I need to run the find/replace function
on with in about 20 documents, but the trick is, I would like to be
able to do the "Find Next" on each word. Stated in a different way,
I would like to find the word "temperature" in the document and
change it with "temp" in specific places but not in others (by
using the find/next button) and when finished, I would like to go to
the next word. I do not want to do a "replace all" on these words.
This is in word 2004 using Mac 10.4.3.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
D

Daiya Mitchell

I don't see how a macro would speed anything up. If you want to selectively
change words, you have to look at each word, and the time spent typing in
the words is pretty marginal on top of that.

One option might be to open all 20 documents. In Word 2004, you can tell
Find and Replace to search all open documents (click on the blue arrow to
expand the dialog). This would save you from re-entering the word for each
document, as you could just go through the 30 words once each time.

John's style trick would be even faster, I think, depending on the set up
time and the length of the documents.
 

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