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
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