DocumentBase.DeleteAllEditableRanges Method (Object)


Deletes permissions in 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)

public void DeleteAllEditableRanges(
	ref object editorID


Type: System.Object

One of the T:Microsoft.Office.Interop.Word.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.

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

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);
Return to top