Class Editors (Word VBA)

A collection of Editor objects that represents a collection of users or groups of users who have been given specific permissions to edit portions of a document. To use a Editors class variable it first needs to be instantiated, for example


Dim edts as Editors
Set edts = ActiveDocument.Range.Editors

For Each

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


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

Add

Returns an Editor object that represents a new permission for a specified user to modify a range or selection within a document.

Add (EditorID)

EditorID: Can be either a String that represents the user's email alias (if in the same domain), an email address, or a WdEditorType that represents a group of users.


Dim objEditor As Editor 
 
Set objEditor = Selection.Editors.Add(wdEditorCurrent)

Count

Returns a the Long that represents the number of Editor objects in the collection.


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

Item

Returns an Editor object that represents a specific user or a group of users who have been given permission to edit a portion of a document.

Item (Index)

Index: Can be either a String that represents the user's email alias (if in the same domain), an email address, or a WdEditorType constant that represents a group of users.


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