Thank you, but I can't get it to work.
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.text = "(hello)*(there)"
.Replacement.text = ""
.Forward = True
.MatchWildcards = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
Do While .Find.found
Words.First.Font.Bold = False
Words.Last.Font.Bold = True
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
I modified my code by incorporating your code into it, but I get a 424 run-time error,
Code:
Words.First.Font.Bold = False