Class Conflict (Word VBA)

The class Conflict represents a conflicting edit in a co authored document. The type of a Conflict object is specified by the WdRevisionType enumeration.

Set

To use a Conflict class variable it first needs to be instantiated, for example

Dim cnf as Conflict
Set cnf = ActiveDocument.Range.Conflicts(Index:=1)

The following procedures can be used to set variables of type Conflict: Conflicts.Item, CoAuthoring.Conflicts and Range.Conflicts

For Each

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

Dim cnf As Conflict
For Each cnf In ActiveDocument.Range.Conflicts
	cnf.Accept 
Next cnf

Properties

Index returns a Long that represents the position of an item in a collection.

Dim lngIndex As Long
lngIndex = ActiveDocument.Range.Conflicts(1).Index

Parent returns an object that represents the parent object of the specified Conflict object.

Dim objParent As Object
Set objParent = ActiveDocument.Range.Conflicts(1).Parent

Range returns a Range object that represents the portion of a document that is contained in the specified object.

Dim rngRange As Range
Set rngRange = ActiveDocument.Range.Conflicts(1).Range

Type returns the WdRevisionTypefor the Conflict object.

Dim wrtType As WdRevisionType
wrtType = ActiveDocument.Range.Conflicts(1).Type

Conflicts.Count returns the number of items in the Conflicts collection.

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

Conflicts.Parent returns an object that represents the parent object of the specified Conflicts object.

Dim objParent As Object
Set objParent = ActiveDocument.Range.Conflicts.Parent