Try:
PS:When posting code, please post formatted code and use the code tags, indicated by the # button on theposting menu. Without them, your code loses much of whatever structure it had.Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "[0-9]{1,}" .Replacement.Text = "" .Format = True .Highlight = True .Forward = True .Wrap = wdFindStop .MatchWildcards = True .Execute End With Do While .Find.Found If .HighlightColorIndex = wdYellow Then .Text = "x" .HighlightColorIndex = wdBlack End If .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True End Sub




Reply With Quote
