共用方式為


DocumentBase.SelectAllEditableRanges(Object) Method

Definition

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

public void SelectAllEditableRanges (ref object editorID);
member this.SelectAllEditableRanges : obj -> unit
Public Sub SelectAllEditableRanges (Optional ByRef editorID As Object)

Parameters

editorID
Object

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.

Examples

The following code example uses the SelectAllEditableRanges method to select all ranges that the current user has the right to modify. To use this example, run it from the ThisDocument class in a document-level project.

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

Remarks

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to