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

# Merge Method of the Documents Object

This method merges specified documents into one document. The method returns a closed document (**IDocument::LockType** = [LT\_None](https://docs.abbyy.com/flexi-capture/sdk/api-reference/locktypeenum.md)).

## Syntax

```vb Visual Basic .NET theme={null}
Function Merge(DocIds As IntsCollection) As Document
```

```cpp C++ theme={null}
HRESULT Merge(
  IIntsCollection* DocIds,
  IDocument**       Result
);
```

## Parameters

**DocIds**

\[in] This variable refers to the [**IntsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/intscollection.md) object that contains the identifiers of the documents which are to be merged.

**Result**

\[out, retval] A pointer to the [**IDocument**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/document.md)**\*** variable that receives the interface pointer for the created document.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**Documents**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documents.md)
