How to: Create Protected Ranges in a Document
- 2 minutes to read
This document provides a step-by-step guide to applying editing restrictions to document ranges using the WinForms Rich Text Editor Ribbon UI.
Make sure the document is unprotected. Disable protections with the Unprotect Document button - in Ribbon UI mode, available from the Review ribbon tab.
- Select a range.
Click the Range Editing Permissions button to invoke the Editing Permissions Dialog. In Ribbon UI mode, the Range Editing Permissions button is in the Review ribbon tab.
In the Editing Permissions dialog, check users and groups with edit permissions in the range. These permissions are enforced when the document is protected. Click OK to apply your changes and close the dialog window.
Click the Protect Document button - available from the Review ribbon tab in the Ribbon UI - to enable document protection.
The Start Enforcing Protection dialog will prompt you for a password. Provide and confirm a document protection password. Click OK to close the dialog.
- Save the document as a DOCX file.
- To enable editing in the range when opening the document in a RichEditControl, set the DXRichEditAuthenticationOptions.UserName property to an allowed user, or the RangePermission.Group property to an allowed group. You assigned the users and groups with range edit permissions in step 4, from the Editing Permissions dialog.
- Load the document from step 7.
- Edit the range. With document protection enabled, ranges without edit permission are read-only.