DocumentBase.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.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public Sub SelectAllEditableRanges ( _
    ByRef editorID As Object _
)
public void SelectAllEditableRanges(
    ref Object editorID
)

Parameters

  • editorID
    Type: System.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.

Remarks

Optional Parameters

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

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 Sub DocumentSelectAllEditableRanges()
    Me.SelectAllEditableRanges(Word.WdEditorType.wdEditorCurrent)
End Sub
private void DocumentSelectAllEditableRanges()
{
    object editorID = Word.WdEditorType.wdEditorCurrent;
    this.SelectAllEditableRanges(ref editorID);
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace