PDA

View Full Version : word97macro for search & replace


andrbea
06-16-2001, 09:54 AM
i've looked hard and long at freeware sites and downloads but can't find what I'm looking for ....

imagine a simple file in a foreign language.
say in dutch, 4 words after one another, separated by spaces, entered into a Word doc file (the source file for the task)

dit dat wordt worden

I want to launch a word macro on that file which replaces the above words.
To do that i use a helpfile, in 2 columns.

(source/target)
eg


dit is to become this
dat ............ that
wordt ........... is
and worden ...... are

can anyone write a word macro that would do that?
ie change each single word occurrence in the source file with the correpsonding english word from the helpfile, perhaps with a prompt for "yes to replace?" at each occurrence of the dutch word in the source file.
it only has to operate on 1 word file, not a chain of mulitple files.
To launch it on the right file, I would need to overwrite the location of the file in the macro. Perhaps via a prompt, at the start?

Tks for any help,


Andrew
http://www.PCGuide.com/ubb/smile.gif

skhips
06-16-2001, 03:37 PM
Word 97 comes with the feature already built in. (Works while typing dont know if it will correct a document done by someone else)

1. Tools drop down menu select Auto correct.

2. Ensure you are on the auto correct Tab.

3. In "Replace" box type the word that needs changing.

4. In "with" box type the word you want it to change to and then click ADD.

5. If running NT4 and you are not the administrator you will need Change permission on the Winnt folder (if you can find the exact file to assign the permission even better). (let me know if you do)

http://www.PCGuide.com/ubb/cool.gif

andrbea
06-17-2001, 10:16 AM
Tks for the reply.

Yes that's the rub ....

The source file for the task is made by someone else, say a week earlier, an external file. And I can't say to them how they should make it (ie with Auto Correct).

No, it has to be something like a Word Macro which I can launch on the source file to make all the changes at once or, alternatively, with a "prompt to replace" warning at each "hit" (for "extra safe" replacements).

It remains a tall order ...
Programs like "Xreplace" only replace filenames or txt.files, not Word files.

Andrew http://www.PCGuide.com/ubb/frown.gif

andrbea
06-17-2001, 10:17 AM
Tks for the reply skhips.

Yes that's the rub ....

The source file for the task is made by someone else, say a week earlier, an external file. And I can't say to them how they should make it (ie with Auto Correct).

No, it has to be something like a Word Macro which I can launch on the source file to make all the changes at once or, alternatively, with a "prompt to replace" warning at each "hit" (for "extra safe" replacements).

It remains a tall order ...
Programs like "Xreplace" only replace filenames or txt.files, not Word files.

Andrew

http://www.PCGuide.com/ubb/frown.gif