'Skip' "continue checking rest of document" prompt (default to "no

K

ker_01

I am importing documents that have lots of extra paragraph marks; the best
solution I have so far is the recorded macro below, which saves me several
keystrokes. However, the last thing that occurs is that Word says that it has
finished making replacements within my selected text, and wants to know if I
want to continue checking the rest of the document (I don't). Is there a way
to eliminate this prompt?

I tried turning DisplayAlerts to false at the top of the macro and back on
below, but then it defaults to thinking I said "yes", and reformats the rest
of my document (ugh).

I appreciate any ideas-
Thank you,
Keith

Sub Remove_extra_PP()

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

End Sub
 
K

ker_01

Attempt #2 to reply (man do I hate this MS web-based newsgroup interface, and
wish that I had NNTP access through our company firewall)

Pesach- thank you for pointing me in the right direction. wdFindContinue
turned out to automatically do the rest of the document, but that pointed me
in the right direction; I used that to find the right part of the help file,
and found that wdFindStop on that line does exactly what I'd hoped to
accomplish.

Best regards,
Keith
 

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