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

# AddNewEx Method of the Batches Object

This method adds a batch of the specified batch type at the end of the collection of batches.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNewEx( _
  Type As BatchType _
) As Batch
```

```cpp C++ theme={null}
HRESULT AddNewEx(
  IBatchType* Type,
  IBatch**    Result
);
```

## Parameters

**Type**

\[in] Refers to the [**BatchType**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batchtype.md) object, which specifies the batch type.

**Result**

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

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

## Samples

This object is used in the following code samples: [Classification](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md#classification).

## See also

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

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