N
newsgroups
Dear all,
Could anyone here advice me how add the marking of deletions to the following macro (found on the web)? Now it only marks insertions. I'd also like to speed this macro up using range objects, but don't know how. Here's the macro I found:
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 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
===============
Kind regards,
S.
Could anyone here advice me how add the marking of deletions to the following macro (found on the web)? Now it only marks insertions. I'd also like to speed this macro up using range objects, but don't know how. Here's the macro I found:
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 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
===============
Kind regards,
S.