Class Revisions (Word VBA)

A collection of Revision objects that represent the changes marked with revision marks in a range or document. To use a Revisions class variable it first needs to be instantiated, for example


Dim rvs as Revisions
Set rvs = ActiveDocument.Range.Revisions

For Each

Here is an example of processing the Revisions items in a collection.


Dim rvs As Revision
For Each rvs In ActiveDocument.Range.Revisions
	
Next rvs

AcceptAll

Accepts all the tracked changes in a document or range, removes all revision marks, and incorporates the changes into the document.

Use the AcceptAllRevisions method to accept all revisions in a document.


If ActiveDocument.Revisions.Count >= 1 Then _ 
 ActiveDocument.Revisions.AcceptAll

Count

Returns a Long that represents the number of revisions in the collection.


Dim lngCount As Long
lngCount = ActiveDocument.Range.Revisions.Count

Item

Returns an individual Revisions object in a collection.

Item (Index)

Index: The individual object to be returned.


Dim rvs As Revision
Set rvs = ActiveDocument.Range.Revisions(Index:=1)

RejectAll

expression. RejectAll


ActiveDocument.Range.Revisions.RejectAll