View Single Post
 
Old 12-19-2019, 01:05 PM
mrplastic mrplastic is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Dec 2019
Posts: 3
mrplastic is on a distinguished road
Default sample code for my question above

For context, I'm envisioning the following code but with "sample" replaced by code that will refer to whatever has been selected in the document.

Quote:
Selection.Find.Replacement.Highlight = True
With Selection.Find
.Text = "sample"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Last edited by mrplastic; 12-19-2019 at 01:06 PM. Reason: title
Reply With Quote