> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TDocumentState

> TDocumentState enumeration for the ITaskWindow interface: document states in the FlexiCapture task window, from locked and closed to edited and opened.

## Description

The document state in the task window. Applies in the [ITaskWindow](/flexi-capture/appendix/scripts-shell/itaskwindow) interface.

## Admissible values:

* DS\_Locked = 0 - The document is locked. No actions on the document are allowed.
* DS\_Edited = 1 - The document is being edited in the document editor.
* DS\_Closed = 2 - The document is closed. It can be both opened and edited.
* DS\_Opened = 3 - The document is opened. It can be edited by using a script.
* DS\_EditedAndOpened = 4 - The document is being edited in the document editor and can be edited by using a script.
* DS\_EditedAndLocked = 5 - The document is opened in the document editor and locked from any actions.

<Note>
  If the document is being edited in the document editor, its state changes to DS\_EditedAndOpened.
</Note>
