"continue searching" message when recording a "find & replace" mac

C

cmmnctng

I want to record a "find & replace" macro that applies only to text that is
highlighted when the macro is run. How do you disable or avoid this
automatic message: "Word has finished searching the selection. [Some # of]
replacements were made. Do you want to search the remainder of the document?"

In other words, how do I convince the macro recorder that I highlighted that
text to set limits -- not just a temporary stopping point -- to the "find &
replace" process?

I don't care if the message appears during the recording process, but I want
to avoid it when the macro is run. The purpose of a macro is to automate
some process with a single key stroke. The "continue searching" message just
adds a further step (hitting the "no" button), and several such steps if the
macro includes multiple "find & replace" actions.

By the way, WordPerfect, Version 8, didn't have this problem.
 
J

Jonathan West

Hi cmmnctng

You need to edit the code of your macro, and ensure that the Wrap property
of the Find is set to wdFindStop.

If you have trouble working out what to do, post the code you have so far,
and we can then show you the exact item that heeds to be changed.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
C

cmmnctng

Jonathan West answered my question accurately and completely. Thank you very
much for a fast, good answer.
 

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