# Restricted Document Access

> Protect TXTextControl documents with EditMode and DocumentPermissions, define editable regions for users and test permissions with CanEdit and CanPrint.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control ActiveX > API Reference > Programming Categories > Restricted Document Access
- **1011 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/restricted-access/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/restricted-access/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/restricted-access/llms-full.txt

---

A `TXTextControl` document can be opened so that users may only change parts of it, or only format it in certain ways. The members below set the edit mode and the document permissions, define editable regions for users and report when the input position enters or leaves such a region.

### Properties

| Member | Description |
|---|---|
| [`TXTextControl.CanCharacterFormat`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/cancharacterformat-property/llms-full.txt) | Informs whether character formatting attributes can be changed for the currently selected text. |
| [`TXTextControl.CanDocumentFormat`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/candocumentformat-property/llms-full.txt) | Informs whether page and section formatting attributes can be changed. |
| [`TXTextControl.CanEdit`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/canedit-property/llms-full.txt) | Informs whether the document's text can be changed at the current text input position. |
| [`TXTextControl.CanParagraphFormat`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/canparagraphformat-property/llms-full.txt) | Informs whether paragraph formatting attributes can be changed for the currently selected text. |
| [`TXTextControl.CanPrint`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/canprint-property/llms-full.txt) | Informs whether the document can be printed. |
| [`TXTextControl.CanStyleFormat`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/canstyleformat-property/llms-full.txt) | Informs whether the document can be formatted with formatting styles. |
| [`TXTextControl.CanTableFormat`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/cantableformat-property/llms-full.txt) | Informs whether table formatting attributes and/or the table layout can be changed for the currently selected text. |
| [`TXTextControl.DocumentPermissions`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/documentpermissions-property/llms-full.txt) | Specifies settings determining how the document can be edited and formatted, when the [EditMode](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editmode-property/llms-full.txt) is changed from **Edit** to **Protected** or **Password Protected**. |
| [`TXTextControl.EditableRegionHighlightMode`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregionhighlightmode-property/llms-full.txt) | This property returns or sets a value determining how editable regions are highlighted in the document. |
| [`TXTextControl.EditableRegionUserId`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregionuserid-property/llms-full.txt) | Returns or sets a user-defined identifier of an editable region. |
| [`TXTextControl.EditableRegionUserName`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregionusername-property/llms-full.txt) | Returns or sets the name of the user who can edit the region. |
| [`TXTextControl.EditMode`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editmode-property/llms-full.txt) | Specifies whether the document is protected or can be freely edited and formatted. |
| [`TXTextControl.UserNames`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/usernames-property/llms-full.txt) | Gets or sets a list of names specifying users who have access to a document. |

### Methods

| Member | Description |
|---|---|
| [`TXTextControl.EditableRegionDelete`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregiondelete-method/llms-full.txt) | This method can be used to delete an editable region from the document. |
| [`TXTextControl.EditableRegionGoto`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregiongoto-method/llms-full.txt) | Sets the current input position to the beginning of the specified editable region and scrolls the text so that this position is at the top of the control's visible text. |
| [`TXTextControl.EditableRegionInsert`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregioninsert-method/llms-full.txt) | This method inserts a new editable region in the text. |

### Events

| Member | Description |
|---|---|
| [`TXTextControl.EditableRegionEntered`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregionentered-event/llms-full.txt) | Occurs when the current input position has been moved to a position that belongs to an editable region. |
| [`TXTextControl.EditableRegionLeft`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/editableregionleft-event/llms-full.txt) | Occurs when the current input position has left an editable region. |

### Related Pages

- [Tracking Document Changes](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/track-changes/llms-full.txt): record and review tracked changes.
- [Commenting a document](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/comments/llms-full.txt): insert, reply to and delete comments.

---

## Nearby

- **Previous:** [Text Selections and Character Input](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/selections/llms-full.txt)
- **Next:** [Tracking Document Changes](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/track-changes/llms-full.txt)
