Class Conflicts (Word VBA)
A collection ofConflict objects that represents the conflicts in a document. The type of a Conflict object is specified by the WdRevisionType enumeration. To use a Conflicts class variable it first needs to be instantiated, for example
Dim cnfs as Conflicts
Set cnfs = ActiveDocument.Range.Conflicts
For Each
Here is an example of processing the Conflicts items in a collection.
Dim cnf As Conflict
For Each cnf In ActiveDocument.Range.Conflicts
Next cnf
AcceptAll
Accepts all of the user's changes, removes the conflicts, and merges the changes into the server copy of the document.
ActiveDocument.CoAuthoring.Conflicts.AcceptAll
Count
Returns the number of items in the Conflicts collection.
Dim confCount as Long
confCount = ActiveDocument.CoAuthoring.Conflicts.Count
Item
Returns an individual Conflicts object in a collection.
Item (Index)
Index: The individual object to be returned.
Dim cnf As Conflict
Set cnf = ActiveDocument.Range.Conflicts(Index:=1)
RejectAll
Rejects all of the user's changes and retains the server copy of the document.
ActiveDocument.CoAuthoring.Conflicts.RejectAll