Class Editor (Word VBA)

The class Editor represents a single user who has been given specific permissions to edit portions of a document. To use a Editor class variable it first needs to be instantiated, for example


Dim edt as Editor
Set edt = ActiveDocument.Range.Editors(Index:=1)

For Each

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


Dim edt As Editor
For Each edt In ActiveDocument.Range.Editors
	
Next edt

Delete

Deletes the specified Editor object.


ActiveDocument.Range.Editors(1).Delete

DeleteAll

Deletes all editing permissions in a document for a specific user.


Dim objEditor As Editor 
 
Set objEditor = Selection.Editors(1) 
 
objEditor.DeleteAll

ID

Returns or sets the identifying label for the specified object when the parent document is saved as a webpage.


Dim strID As String
strID = ActiveDocument.Range.Editors(1).ID

Name

Returns or sets the name of the specified object.


Dim strName As String
strName = ActiveDocument.Range.Editors(1).Name

NextRange

Returns a Range object that represents the next range for which a user has permissions to modify.

You can also use the GoToEditableRange method of the Range object to return the next range for which a user has permission to modify.


Dim objEditor As Editor 
Dim objRange As Range 
 
Set objEditor = Selection.Editors(1) 
Set objRange = objEditor.NextRange

Range

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

For information about returning a range from a document or returning a shape range from a collection of shapes, see the Range method.


ActiveDocument.Paragraphs(1).Range.Style = wdStyleHeading1

SelectAll

Selects all the shapes in a document that were inserted or edited by a single user.

This method doesn't select InlineShape objects.


ActiveDocument.Range.Editors(1).SelectAll