Try:
![]()
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "ST*SE" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With Do While .Find.Found MsgBox Len(.Text) - Len(Replace(.Text, "~", "")) & " tildes found." .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True End Sub
Bookmarks