Document.DeleteAllEditableRanges Method (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .DeleteAllEditableRanges(EditorID)

expression Required. A variable that represents a Document object.

Parameters

Name

Required/Optional

Data Type

Description

EditorID

Optional

Variant

Can be either a String that represents 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. If omitted, no permissions are deleted from a document.

You can also use the DeleteAll method to delete permissions in all ranges for which a specified user or group of users has permission to modify.

The following example deletes all permissions in all ranges for the current user.

ActiveDocument.DeleteAllEditableRanges wdEditorCurrent
Show: