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

# Pages moved

> Use the Pages moved event script in ABBYY FlexiCapture to act on pages transferred between documents, such as saving merged registration parameters.

<Note>
  Pages can be moved during the document assembly as well.
</Note>

## What it does

The handler of this event can be used if you need to do some manipulation on the new document based on the source documents, for example, to save the merged registration parameters.

If one document is fully embedded into another one, then in the **Pages** array its pages will go in succession and in the same order as they go in the target document.

<Note>
  After merging pages the layout of the target document can change.
</Note>

## When it is launched

The script is launched prior to moving pages from one document to another.

## Parameters

| **Name**          | **Type**                                               | **Access**                                                                                                              | **Description**                                       |
| ----------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| Batch             | [IBatch](/flexi-capture/appendix/scripts/ibatch)       | Internal[\*](/flexi-capture/appendix/scripts/moving-pages#asterisk) fields of batch documents and pages are unavailable | The batch                                             |
| InsertionPosition | int                                                    | Read-only                                                                                                               | The position in the document where pages are inserted |
| Pages             | [IPages](/flexi-capture/appendix/scripts/ipages)       | Read-only                                                                                                               | The array of pages being moved                        |
| TargetDocument    | [IDocument](/flexi-capture/appendix/scripts/idocument) | Read/write                                                                                                              | The target document pages are moved into              |

<a id="asterisk" />\* - The internal field requires loading the object into memory.
