Class CoAuthUpdate (Word VBA)

The class CoAuthUpdate represents a range of text that has been updated by a co author.

Set

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

Dim cau as CoAuthUpdate
Set cau = ActiveDocument.Range.Updates(Index:=1)

The following procedures can be used to set variables of type CoAuthUpdate: CoAuthUpdates.Item, CoAuthoring.Updates and Range.Updates

For Each

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

Dim cauUpdate As CoAuthUpdate
For Each cauUpdate In ActiveDocument.Range.Updates
	
Next cauUpdate

Parent

Returns an object that represents the parent object of the specified CoAuthUpdate object.

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

Range

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

Dim rng As Range 
 
Set rng = ActiveDocument.CoAuthoring.Updates(1).Range 

CoAuthUpdates.Count

Returns the number of items in the CoAuthUpdates collection.

MsgBox "The active document contains " & _ 
    ActiveDocument.CoAuthoring.Updates.Count & " update(s)."

CoAuthUpdates.Item

Returns an individual CoAuthUpdates object in a collection.

Syntax : expression.Item (Index)

Index: The individual object to be returned.

Dim cau As CoAuthUpdate
Set cau = ActiveDocument.Range.Updates(Index:=1)

CoAuthUpdates.Parent

Returns an object that represents the parent object of the specified CoAuthUpdates object.

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