RSS

Macro to Highlight Track Changes in Word

23 Feb

Note: This macro highlights only the insertions in your track changes. It does not highlight the deletions.

Often, we need to highlight the changes in our document after making the corrections suggested by a reviewer. I came across this interesting macro that made my job easy.

To change the highlight color, find the word WdYellow in the code above and change it to WdTurquoise, WdBrightGreen or other highlight color names.

Macro Courtesy: p2p.wrox.com

Advertisements
 
6 Comments

Posted by on February 23, 2011 in Tools, Tricks

 

6 responses to “Macro to Highlight Track Changes in Word

  1. Craig

    March 27, 2012 at 1:17 am

    This worked great. Thanks.
    Would you know how to change the code so it would only run on selected paragraphs instead of the whole document?

     
  2. The Bean Lover

    September 21, 2015 at 11:39 pm

    It works great. Be patient. It took 20 minutes to go through my manuscript with 374 changes in 31 pages.

     
  3. Naveen

    November 20, 2015 at 12:11 am

    Thank you. For me this works for tracked changes in the body of the document, but not for those in the footnotes. Do you know how to address this?

     
  4. sh

    September 29, 2016 at 5:24 pm

    this one is for both kind of changes … i am not a professional programmer or word user so i dont know if it is stable:

    Sub HLight_Changes()

    Dim reduce As Boolean
    Dim i As Long
    Dim iMax As Long
    Dim Range2 As Range
    Dim bAccept As Boolean ‘ Set this to True if you want to accept revision

    ActiveDocument.TrackRevisions = False

    iMax = ActiveDocument.Revisions.Count
    For i = 1 To iMax
    If i > iMax Then Exit For
    Debug.Print ActiveDocument.Revisions(i).Type
    reduce = False
    If ActiveDocument.Revisions(i).Type = wdRevisionDelete Then
    Set Range2 = ActiveDocument.Revisions(i).Range.FormattedText
    Range2.HighlightColorIndex = wdYellow
    Range2.Font.StrikeThrough = True
    ActiveDocument.Revisions(i).Range.InsertAfter (Range2)
    ActiveDocument.Revisions(i).Accept
    reduce = True
    Else
    If ActiveDocument.Revisions(i).Type = wdRevisionInsert Then
    ActiveDocument.Revisions(i).Range.HighlightColorIndex = wdBrightGreen
    ActiveDocument.Revisions(i).Accept
    reduce = True
    End If
    End If
    If reduce = True Then
    i = i – 1
    iMax = iMax – 1
    End If
    Next i
    ActiveDocument.TrackRevisions = True
    End Sub

     
    • KE

      January 10, 2017 at 12:57 am

      Here is a much faster way to highlight track change insertions in a word document:

      Sub Highlight_insertions2()

      ‘ Highlight_insertions_2 Macro


      Dim arev As Revision
      With ActiveDocument
      .TrackFormatting = True
      For Each arev In .Revisions
      If arev.Type = wdRevisionInsert Then
      arev.range.HighlightColorIndex = wdYellow
      End If
      Next
      End With
      End Sub

       
  5. KE

    January 10, 2017 at 12:56 am

    This is a much faster solution for highlighting tracked change insertions in a word document:

    Sub Highlight_insertions2()

    ‘ Highlight_insertions_2 Macro


    Dim arev As Revision
    With ActiveDocument
    .TrackFormatting = True
    For Each arev In .Revisions
    If arev.Type = wdRevisionInsert Then
    arev.range.HighlightColorIndex = wdYellow
    End If
    Next
    End With
    End Sub

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: