Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wordbasic question - how to do a search without a query box
Message
 
To
All
General information
Forum:
Microsoft Office
Category:
Word
Title:
Wordbasic question - how to do a search without a query box
Miscellaneous
Thread ID:
00078970
Message ID:
00078970
Views:
54
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
Map
View

Click here to load this message in the networking platform