General information
Title:
Wordbasic question - how to do a search without a query box
In Word (7.0) - a macro (shown below) is used to do search-and-replace functions on a selected block of text. However, there are four searches in the macro. And whenever the macro is run - word asks me four times if I want to continue searching the rest of the document. Every time I run this macro, I have to click No four times - which is obviously inconvenient.
How can I program this macro to perform the Search-and-Replace on a selected block of text, without searching the rest of the document, and without asking me every time?
-------------------------------------------------------------------
Macro shown below:
Sub MAIN
EditReplace .Find = "^p", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 2, .FindAllWordForms = 0
EditReplace .Find = " ", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 2, .FindAllWordForms = 0
EditReplace .Find = " ", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 2, .FindAllWordForms = 0
EditReplace .Find = ". ", .Replace = ". ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 2, .FindAllWordForms = 0
CharRight 1
InsertPara
End Sub
--------------------------------------------------------------------
Thanks! :)
Daniel
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only