Sdílet prostřednictvím


DocumentBase.DeleteAllEditableRanges(Object) Method

Definition

Deletes permissions in all ranges that the specified user or group of users has permission to modify.

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

Parameters

editorID
Object

One of the WdEditorType values that represents a group of users, or a user's e-mail alias (if in the same domain), or an e-mail address. If omitted, no permissions are deleted from the document.

Examples

The following code example uses the DeleteAllEditableRanges method to delete all permissions in all ranges for the current user. To use this example, run it from the ThisDocument class in a document-level project.

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

Remarks

You can also use the Microsoft.Office.Interop.Word.Editor.DeleteAll method of the Microsoft.Office.Interop.Word.Editor object to delete permissions in all ranges that a specified user or group of users has permission to modify.

Applies to