iam70
January 29th, 2000, 07:07 PM
I have written a macro in Word 97 where all text is selected, certain characters are looked for and replaced. (see below)
The macro works find. However, at the end of the replace process, the macro stops and displays the window where it tells me that the selection had been searched and whether I want the process done for the rest of the document.
It is annoying that the macro stops and asks for the input. Is there any way that I can suppress this message. Especially, since as part of the macro the whole document is selected.
Thanks for your help. Any response is appreciated.
Issam
Selection.WholeStory
Selection.Font.Size = 12
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
The macro works find. However, at the end of the replace process, the macro stops and displays the window where it tells me that the selection had been searched and whether I want the process done for the rest of the document.
It is annoying that the macro stops and asks for the input. Is there any way that I can suppress this message. Especially, since as part of the macro the whole document is selected.
Thanks for your help. Any response is appreciated.
Issam
Selection.WholeStory
Selection.Font.Size = 12
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With