I have over 100 documents I need to search for a specific text string and
delete it. Please help with the code
ActiveDocument.
What comes next?
That wasn't much of an attempt.
And it's the wrong place to start, anyway.
Fortunately, the whole macro already exists at
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm. Also see
http://www.gmayor.com/installing_macro.htm if needed.
Put all the documents into one folder. Put the path of that template into the
macro in the line that starts "PathToUse = ", replacing the "C:\Test\" -- and be
sure to keep the backslash as the last character. For example, if you put the
documents in the folder D:\My Documents\Replacements then the line in the macro
should be
PathToUse = "D:\My Documents\Replacements\"
When you run the macro, it shows the ordinary Replace dialog. Put your specific
text string in the Find What box, and leave the Replace With box empty. After
you click OK in that dialog, a message will ask whether to process the rest of
the files in the folder. Click Yes and wait for the macro to finish.