View Single Post
 
Old 05-18-2020, 10:34 AM
eduzs eduzs is offline Windows 10 Office 2019
Expert
 
Join Date: May 2017
Posts: 262
eduzs is on a distinguished road
Default One line find execute in this case is possible?

Is that possible to modify those lines to a single line find.execute command?
Thanks

Code:
With Activedocument.StoryRanges(wdMainTextStory).Find
    .Text = "Hi there*Here"
    With .Replacement
        .Text = "^&"
        .Font.Size = 11
    End With
    .Wrap = wdFindContinue
    .Format = True
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
End With
__________________
Backup your original file before doing any modification.
Reply With Quote