DocumentBase.SelectAllEditableRanges 方法

選取所指定使用者或群組具備修改權限的所有範圍。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

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

參數

  • editorID
    型別:System.Object%
    可以是使用者的電子郵件別名 (如果在相同網域中)、電子郵件地址,或是代表使用者群組的 WdEditorType 常數。預設為只選取所有使用者都具備其使用權限的範圍。

備註

選擇性參數

如需選擇性參數的詳細資訊,請參閱Office 方案中的選擇性參數

範例

下列程式碼範例會使用 SelectAllEditableRanges 方法,選取目前使用者具備修改權限的所有範圍。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

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

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間