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

# AddImage Method of the Batch Object

This method allows you to add an image from file to the batch. The method creates document in the batch for added image.

> [!NOTE]
>
> When adding an image, the parameters of image preparation ([**ImageLoadingParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageloadingparams.md) object) are used, which are identical to the parameters related to the batch type into which the image is added.

## Syntax

```vb Visual Basic .NET theme={null}
Sub AddImage(Path As String)
```

```cpp C++ theme={null}
HRESULT AddImage(
  BSTR Path
);
```

## Parameters

**Path**

\[in] This variable contains the full path to the image file. For example, "D:\SampleImages\Sample.tif".

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

## Remarks

* To add several images to the batch, you can use the [**AddImages**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch-addimages.md) method of the [**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md) object. This method allows you to set different parameters of image adding.
* You may also use this method to open digital documents of [supported formats](https://docs.abbyy.com/flexi-capture/sdk/specifications/digitalinputformats.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("D:\\TestProject\\TestProject.fcproj");
> // Add new batch
> FCEngine::IBatchPtr batch = project->Batches->AddNew( L"TestBatch" );
> // Open the batch
> batch->Open();
> // Add image to the batch
> batch->AddImage( L"D:\\SampleImages\\0001.tif" );
> ...
> ```

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

## See also

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