Need to Hide/Suppress Dialog after Search and Replace

J

Joanne

I have a VB routine that selects a portion of a document
and does a search and replace routine on that selected
portion. However, after each replace routine, I get a
dialog box saying

"Word has finished searching the selection. 10
replacements were made. Do you want to search the
remainder of the document?" Yes/No

I do not want this to appear but don't know how to
suppress it....

Any suggestions would be greatly appreciated. Thanks!
 
J

Jay Freedman

Hi, Joanne,

Somewhere in your Find code will be either

.Wrap = wdFindAsk

or the equivalent numeric form

.Wrap = 2

To suppress the dialog, change that code to

.Wrap = wdFindStop

if the Word constants are defined in your VB code, or else use the numeric
form

.Wrap = 0
 

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