Expand Minimize

DocumentBase.DeleteAllEditableRanges Method

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
)

Parameters

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

You can also use the 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.

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);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft