> ## 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.

# IDocumentItem

> IDocumentItem represents a document shown in the FlexiCapture documents window: select or expand it and read its pages, rectangle, and next workflow stage.

## What it does

Represents a document in the [documents window](/flexi-capture/appendix/scripts-shell/idocumentswindow).

## Properties

| **Name**        | **Type**                                                               | **Access** | **Description**                                                                                                 |
| --------------- | ---------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- |
| Collection      | [IDocumentItems](/flexi-capture/appendix/scripts-shell/idocumentitems) | Read-only  | The collection that contains the document                                                                       |
| Document        | [IDocument](/flexi-capture/appendix/scripts/idocument)                 | Read-only  | The document                                                                                                    |
| Expanded        | bool                                                                   | Read/write | Specifies whether the document is expanded                                                                      |
| MarkedNextStage | [IStageInfo](/flexi-capture/appendix/scripts/istageinfo)               | Read-only  | The next stage to which the document will be sent after the task is complete.                                   |
| PageItems       | [IPageItems](/flexi-capture/appendix/scripts-shell/ipageitems)         | Read-only  | The collection of pages included in the document                                                                |
| Rect            | [IShellRect](/flexi-capture/appendix/scripts-shell/i-shell-rect)       | Read-only  | The rectangle of the document in the [IDocumentsWindow](/flexi-capture/appendix/scripts-shell/idocumentswindow) |
| Selected        | bool                                                                   | Read/write | Specifies whether the document is selected                                                                      |
| TaskDocument    | bool                                                                   | Read-only  | Specifies whether the document belongs to the current task                                                      |
| TaskWindow      | [ITaskWindow](/flexi-capture/appendix/scripts-shell/itaskwindow)       | Read-only  | The task window                                                                                                 |

<Note>
  For the **Thumbnails** **view** mode, the **Expanded** property value is always **true**. Setting the property to **false** does not result in errors, but the value will remain **true**.
</Note>

<Note>
  If the document is collapsed, the **DocumentItem.PageItems.Count** property returns "0".
</Note>
