A family of Microsoft word processing software products for creating web, email, and print documents.
Hi Steve8d, I'm Femi and I'd be happy to help you with your question. Apologies for the challenge encountered. The error message you're receiving, "Compile Error: Method or data member not found," indicates that the property or method "wdTurquoise" is not recognized by the compiler. This error typically occurs when there is a reference to an undefined constant or object. Kindly try using the modified code below: Sub Colour_Test() Application.ScreenUpdating = False With Selection.Find . ClearFormatting . Replacement.Text = "" . Forward = True . Wrap = wdFindStop . Format = True . MatchCase = False . MatchWholeWord = False . MatchAllWordForms = False . MatchSoundsLike = False . MatchWildcards = True Do . Text = "All([0-9]{1,}-[0-9]{1,}-[0-9]{1,}-[0-9]{1,})" If . Execute Then . Text = "([0-9]{1,}-[0-9]{1,}-[0-9]{1,}-[0-9]{1,})" . Execute With Selection.Font . Bold = True . Color = wdColorBlue . HighlightColorIndex = 3 ' Replace wdTurquoise with its numeric value End With Selection.MoveDown Unit:=wdLine, Count:=1 Else Exit Do End If Loop End With Application.ScreenUpdating = True End Sub
Hope this resolves the issue!
Best Regards, Femi