CoAuthUpdate Object
TOC
Collapse the table of content
Expand the table of content

CoAuthUpdate Object (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents a range of text that has been updated by a co-author.

When a document that has co-authoring enabled is edited by more than one author, changes to the document by one author are pushed to other authors’ versions of the document by using updates. When a co-author performs an explicit document save (by pressing CTRL + S, for example), changes made by other co-authors are merged into the document as updates. The CoAuthUpdates collection contains all changes that were merged into the document, where each change is a single update represented by a CoAuthUpdate object.

The contents of the CoAuthUpdates collection remains the same until a co-author performs another explicit document save. When the co-author saves the document again, if there are no new changes from other co-authors that are merged into the document, the CoAuthUpdates collection retains the same updates that were merged at the previous explicit save. If there are new changes that are merged into the document, the CoAuthUpdates collection contains the new updates for the document. Use a CoAuthUpdate object to retrieve an individual update from the CoAuthUpdates collection.

The following code example gets the associated text in the range of each CoAuthUpdate object in the active document.

Dim caUpdate As CoAuthUpdate 
Dim strText As String 
 
For Each caUpdate In ActiveDocument.CoAuthoring.Updates 
    strText = caUpdate.Range.Text 
    MsgBox strText 
Next caUpdate
Show:
© 2016 Microsoft