View Single Post
 
Old 04-19-2022, 03:40 AM
oddworld oddworld is offline Mac OS X Office 2021
Novice
 
Join Date: Apr 2022
Posts: 5
oddworld is on a distinguished road
Default

Solved it - Just removed the one from the r.cells(1).shading.BackgroundPatternColor = wdOrange row.

[Sub AmberText()

Dim r As Range, wdOrange As Long
wdOrange = 41215
Set r = ActiveDocument.Range
With r.Find
Do While .Execute(FindText:="Amber", MatchWholeWord:=True, Forward:=True) = True
r.Cells.Shading.BackgroundPatternColor = wdOrange
Loop
End With

End Sub]
Reply With Quote