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

# On Document Closed

> Handle the On Document Closed event in FlexiCapture interface scripts: it runs after changes are confirmed when a document closes in the document editor.

## When it is launched

The script is launched after confirming the changes when closing a document in the document editor.

## Parameters

| **Name** | **Type**                                                                 | **Access** | **Description**     |
| -------- | ------------------------------------------------------------------------ | ---------- | ------------------- |
| Context  | [IDocumentEditor](/flexi-capture/appendix/scripts-shell/idocumenteditor) | Read/write | The document editor |
