Sub NumbersInSingleQuotesHighlight() ' Paul Beverley - Version 16.12.24 ' Finds numbers (numerals) inside single quotes and highlights them myColour = wdYellow Set rng = ActiveDocument.Content With rng.Find .ClearFormatting .Replacement.ClearFormatting .Text = ChrW(8216) & "*[0-9]{1,}" .Wrap = wdFindStop .Replacement.Text = "" .Forward = True .MatchWildcards = True .MatchWholeWord = False .Execute End With Do While rng.Find.Found = True rng.Select If InStr(rng, ChrW(8217)) = 0 Then ' rng.MoveEnd , -1 ' rng.Collapse wdCollapseEnd rng.HighlightColorIndex = myColour rng.Select Else apos = InStr(rng, ChrW(8217) & "s") rng.MoveStart , apos rng.Select sapo = InStr(rng, "s" & ChrW(8217)) rng.MoveStart , sapo + 1 rng.Select If InStr(rng, ChrW(8217)) = 0 Then ' rng.MoveEnd , -1 ' rng.Collapse wdCollapseEnd rng.HighlightColorIndex = myColour rng.Select End If End If rng.Collapse wdCollapseEnd rng.Find.Execute DoEvents Loop Beep End Sub