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

# Batch オブジェクトの Export メソッド

このメソッドは、指定したドキュメントの処理結果を選択した場所に保存します。バッチ内のすべてのドキュメントの結果を保存することも、結果をエクスポートするドキュメントを個別に指定することもできます。保存先、ファイル形式、その他のエクスポート設定を指定するには、[**ExportParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/exportparams.md) オブジェクトを使用します。

> [!NOTE]
>
> 同じエクスポート設定で **Export** メソッドを再度呼び出しても、エクスポートは実行されません。

## 構文

```vb Visual Basic .NET theme={null}
Sub Export( _
  DocIds As IntsCollection, _
  Params As ExportParams _
)
```

```cpp C++ theme={null}
HRESULT Export(
  IIntsCollection*  DocIds,
  IExportParams*    Params
);
```

## パラメーター

**DocIds**

\[in] 結果をエクスポートするドキュメントの識別子のセットを格納した [**IntsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/intscollection.md) オブジェクトを参照します。このパラメーターには 0 を指定できます。その場合、バッチ内のすべてのドキュメントがエクスポートされます。

**Params**

\[in] エクスポートパラメーターを格納した [**ExportParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/exportparams.md) オブジェクトを参照します。このパラメーターには 0 を指定できます。その場合、各ドキュメントには対応する Document Definition のエクスポートパラメーターが使用されます。

> [!NOTE]
>
> 対応する Document Definition が存在しない場合は、[IBatchTypeParams::ExportParamsForUnknownDocuments](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batchtypeparams.md#exportparamsforunknowndocuments) プロパティのエクスポートパラメーターが使用されます。バッチタイプが存在しない場合は、[IProjectProperties::ExportParamsForUnknownDocuments](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/projectproperties.md#exportparamsforunknowndocuments) プロパティのエクスポートパラメーターが使用されます。

## 戻り値

このメソッドに固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## 解説

複数のバッチに含まれるドキュメントの結果をエクスポートするには、[**Project**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/project.md) オブジェクトの [**Export**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/project-export.md) メソッドを使用します。

## サンプル

> [accordion] C++ (COM) コード
>
> ```cpp theme={null}
> // グローバルな ABBYY FlexiCapture SDK の Engine オブジェクト。
> FCEngine::IEnginePtr Engine;
> ...
> // プロジェクトを開く
> FCEngine::IProjectPtr project = Engine->OpenProject("D:\\TestProject\\TestProject.fcproj");
> // 新しいバッチを追加する
> FCEngine::IBatchPtr batch = project->Batches->AddNew( L"TestBatch" );
> // バッチを開く
> batch->Open();
> // バッチに画像を追加し、ドキュメントを認識する
> ...
> // 結果をエクスポートする
> batch->Export( 0, 0 );
> ```

## 関連項目

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

[エクスポートパラメーターの調整](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/exportparams.md)
