Created
December 5, 2019 19:23
-
-
Save hmartiniano/712505f4a931991febe3474d3e8c41a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Adapted from https://stackoverflow.com/questions/34280088/ms-word-macro-for-converting-track-changes-markup-into-text | |
Sub TrackChangesToMarkup() | |
Dim chgAdd As Word.Revision | |
If ActiveDocument.Revisions.Count = 0 Then | |
MsgBox "There are no revisions in this document", vbOKOnly | |
Else | |
ActiveDocument.TrackRevisions = False | |
For Each chgAdd In ActiveDocument.Revisions | |
If chgAdd.Type = wdRevisionDelete Then | |
chgAdd.Range.Font.StrikeThrough = True | |
chgAdd.Range.Font.Color = wdColorDarkBlue | |
chgAdd.Reject | |
ElseIf chgAdd.Type = wdRevisionInsert Then | |
chgAdd.Range.Font.Color = wdColorRed | |
chgAdd.Accept | |
Else | |
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