Search Macro that Pauses for User Input

L

LizW

Hi there,

In our law office, I'm trying to create a macro that will
search a document for variables that will change. It
should bring up the search dialog box or prompt for the
keyword, and then look for it. After that, it should
repeat again until the user presses escape.

Any ideas? Thanks so much.
 
P

Perry

Use the macrorecorder.
http://www.mvps.org/word/FAQs/MacrosVBA/UsingRecorder.htm

While the recorder is in Record mode, do the actions you would perform
to bring up the Find/Replace dialog ...etc.

Here are a couple of additional articles relating to your quest
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odeopg/html
/deovrthefindreplacementobjects.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/htm
l/womthexecutefindobj.asp

http://www.mvps.org/word/FAQs/MacrosVBA/ReplceTextWithDoc.htm

http://www.mvps.org/word/FAQs/MacrosVBA/ClearFind.htm

If you get stuck, kindly repost indicating which Office version y're running
and include some relevant parts of code that are likely to be the buggers.

Krgrds,
Perry
 

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