View Single Post
 
Old 11-04-2019, 02:42 AM
dita dita is offline Windows XP Office 2010 64bit
Advanced Beginner
 
Join Date: Apr 2018
Posts: 34
dita is on a distinguished road
Default

Sorry, this the macro where I want to insert the exception.


I want to change font color to red. The exception are the hyperlinks. Any URL in the document should keep their color without changing to red.


Sub Macro1()
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
Selection.Find.Execute Replace:=wdReplaceAll
End Sub


Thanks!
Reply With Quote