| Member with 6 posts. THREAD STARTER | | Join Date: Jul 2012 Experience: Intermediate | |
Word 2010 Macro for Highlighting Revisions in Track Changes Greetings! I am an I.S. Support tech needing a little guidance with the below Word 2010 Macro. I've edited a macro found with a few google searches which gets the job done, but much much too slowly. Does anyone have a suggestion on how I can clean up the script to complete the function faster? Please let me know  .. Quote:
Sub Highlight_Revisions()
Dim i As Long
Dim iMax As Long
Dim bAccept As Boolean ' Set this to True if you want to accept revision
ActiveDocument.TrackRevisions = False
' ----------------------------
' Set bAccept = True if Insertions to be Accepted
' ----------------------------
bAccept = False
' ----------------------------
iMax = ActiveDocument.Revisions.Count
For i = 1 To iMax
If i > iMax Then Exit For
Debug.Print ActiveDocument.Revisions(i).Type
If ActiveDocument.Revisions(i).Type = wdRevisionInsert Or ActiveDocument.Revisions(i).Type = wdRevisionDelete Then
ActiveDocument.Revisions(i).Range.HighlightColorIndex = wdYellow
If bAccept = True Then
ActiveDocument.Revisions(i).Accept
i = i - 1
iMax = iMax - 1
End If
End If
Next i
ActiveDocument.TrackRevisions = True
End Sub
| |