That works perfectly - thank you!
Is there any chance you can explain how that works? I have another macro that I need to loop through as well... it will find blue text with an underline, remove the formatting, cut it, turn on change tracking, paste it back in, then turn off change tracking. I've tried to mimic what you had, but it doesn't seem to work...
Code that works (without the loop):
Sub ChangeTrackBlueFont()
'
' ChangeTrackBlueFont Macro
'
'
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineSingle
.Color = wdColorBlue
End With
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineNone
Selection.Cut
ActiveDocument.TrackRevisions = Not ActiveDocument.TrackRevisions
Selection.PasteAndFormat (wdFormatOriginalFormatting)
ActiveDocument.TrackRevisions = Not ActiveDocument.TrackRevisions
End Sub
|