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

# AddNew Method of the Batches Object

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

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew() As Batch
```

```cpp C++ theme={null}
HRESULT AddNew(
  IBatch** Result
);
```

## Parameters

**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

> [accordion] C++ (COM) code
>
> ```cpp theme={null}
> // Global ABBYY FlexiCapture SDK Engine object.
> FCEngine::IEnginePtr Engine;
> ...
> // Open the project
> FCEngine::IProjectPtr project = Engine->OpenProject(L"D:\\TestProject\\TestProject.fcproj");
> // Add new batch
> FCEngine::IBatchPtr batch = project->Batches->AddNew( L"TestBatch" );
> ...
> ```

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

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