Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
How to call Find.execut
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="macropod, post: 5888877"] Hi mjlaali, In a Find/Replace operation, you can set most of the parameters via Find. For example: Sub Find_Replace() With Selection.Find .ClearFormatting .Replacement.ClearFormatting .Text = "1234" .Replacement.Text = "5678" .Forward = True .Wrap = wdFindStop ' wdFindStop (0); wdFindContinue (1); wdFindAsk (2) .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Replace:=wdReplaceNone 'wdReplaceNone - (0); wdReplaceOne - (1); wdReplaceAll - (2) End With End Sub There's plenty more 'Find' parameters too, covering such things as the font formatting, Word Style and so on. You can access these via Word's vbe, where you can also use the object browser to get the values for and of the 'wd' contstants for any parameters you're interested in. Word's vba helpfile has further information also. For your purposes, you'll probably need to call the 'Wrap' and 'Replace' parameters with the numeric values, as indicated in the comments on the corresponding lines above. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
How to call Find.execut
Top