NextRevision Method Example

This example rejects the next tracked change found after the fifth paragraph in the active document. The myRev variable is set to Nothing if a change is not found.

If ActiveDocument.Paragraphs.Count >= 5 Then
    Set myRange = ActiveDocument.Paragraphs(5).Range
    myRange.Select
    Set myRev = Selection.NextRevision
    If Not (myRev Is Nothing) Then myRev.Reject
End If

This example accepts the next tracked change found if the change type is inserted text.

Set myRev = Selection.NextRevision(Wrap:=True)
If Not (myRev Is Nothing) Then
    If myRev.Type = wdRevisionInsert Then myRev.Accept
End If