SelectAllEditableRanges Method
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Document.SelectAllEditableRanges Method

Selects all ranges that the specified user or group of users has permission to modify.

Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in microsoft.office.tools.word.dll)

public virtual void SelectAllEditableRanges (
	[OptionalAttribute] ref Object EditorID
)

Parameters

EditorID

Can be the user's e-mail alias (if in the same domain), an e-mail address, or a WdEditorType constant that represents a group of users. The default is that only ranges for which all users have permissions are selected.

Optional Parameters

For information on optional parameters, see Understanding Optional Parameters in COM Interop.

The following code example uses the SelectAllEditableRanges method to select all ranges that the current user has the right to modify.

private void DocumentSelectAllEditableRanges()
{
    object editorID = Word.WdEditorType.wdEditorCurrent;
    this.SelectAllEditableRanges(ref editorID);
}

Show:
© 2016 Microsoft