Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Word 2011-compatible macro for baking in tracked changes as formatted text, after
Sub TypeAndStrike()
' Converts tracked revisions in the active document into "type and Strike " format."
' It removes all tracked revisions.
' written by Chip Orange.
Dim chgAdd As Word.Revision
' disable tracked revisions.
If ActiveDocument.Revisions.Count = 0 Then
MsgBox "There are no revisions in this document", vbOKOnly
ActiveDocument.TrackRevisions = False
For Each chgAdd In ActiveDocument.Revisions
chgAdd.Range.Font.Color = wdColorRed
If chgAdd.Type = wdRevisionDelete Then
' It's a deletion, so make it strike through and then reject the change (so the text isn't lost).
chgAdd.Range.Font.StrikeThrough = True
ElseIf chgAdd.Type = wdRevisionInsert Then
' It's an addition, so underline it.
chgAdd.Range.Font.Underline = wdUnderlineSingle
MsgBox ("Unexpected Change Type Found"), vbOKOnly + vbCritical
chgAdd.Range.Select ' move insertion point
End If
Next chgAdd
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment