Hi All,
In MS Word document, I had a text object with text in it. I am replacing a word "Internet Knowledge Base" with other word "Internet-KB". I placed the replacing logic with in a macro. But when ever the macro is executed it is Prompting me with "Do you want to replace text" Yes or No. I want to suppress these message windows.So that user no need to press enter key for every replacement.
The macro code is as below.
Selection.ShapeRange.Select
ActiveDocument.Shapes("Text Box 56"
.Select
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Internet Knowledge Base"
.Replacement.Text = "Internet-KB"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Is there any way to suppress the prompts generated while replacing the text.
Any help is really appreciated.
Regards
Nagaraj
In MS Word document, I had a text object with text in it. I am replacing a word "Internet Knowledge Base" with other word "Internet-KB". I placed the replacing logic with in a macro. But when ever the macro is executed it is Prompting me with "Do you want to replace text" Yes or No. I want to suppress these message windows.So that user no need to press enter key for every replacement.
The macro code is as below.
Selection.ShapeRange.Select
ActiveDocument.Shapes("Text Box 56"
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Internet Knowledge Base"
.Replacement.Text = "Internet-KB"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Is there any way to suppress the prompts generated while replacing the text.
Any help is really appreciated.
Regards
Nagaraj