View Single Post
 
Old 07-06-2022, 08:13 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

What you posted looks nothing like the solution I posted earlier.


Code:
Sub ChangeTrackBlueFont()
Dim oRng As Range
  Selection.Find.ClearFormatting
  Set oRng = ActiveDocument.Range
  With oRng.Find
    With .Font
      .StrikeThrough = True
      .DoubleStrikeThrough = False
      .Color = wdColorBlue
    End With
    While .Execute
      oRng.Delete
    Wend
  End With
  ActiveDocument.TrackRevisions = False
  Set oRng = ActiveDocument.Range
  Selection.Find.ClearFormatting
    With oRng.Find
    With .Font
      .Underline = wdUnderlineSingle
      .Color = wdColorBlue
    End With
    While .Execute
      With oRng.Font
        .UnderlineColor = wdColorAutomatic
        .Underline = wdUnderlineNone
      End With
      oRng.Cut
      ActiveDocument.TrackRevisions = Not ActiveDocument.TrackRevisions
      oRng.PasteAndFormat (wdFormatOriginalFormatting)
      ActiveDocument.TrackRevisions = Not ActiveDocument.TrackRevisions
    Wend
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote