> ## 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 オブジェクトの ExportToMemory メソッド

このメソッドは、指定したドキュメントの処理結果を、仮想ファイルシステムとして表現されたメモリに保存します。バッチ内のすべてのドキュメントの結果を保存することも、結果をエクスポートするドキュメントを個別に指定することもできます。エクスポート設定は [**ExportParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/exportparams.md) オブジェクトで指定します。ただし、[**FileExportParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fileexportparams.md) オブジェクトの [**RootPath**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fileexportparams.md#rootpath) プロパティの値と、[**ImageExportParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageexportparams.md) オブジェクトの [**Path**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageexportparams.md#path) プロパティの値は常に無視されます。代わりに、仮想ファイルシステムのルートを基準とした Export ディレクトリと Images ディレクトリが、出力ファイルの保存先フォルダーとして使用されます。Export ディレクトリと Images ディレクトリの中には、さらにサブフォルダーを作成することもできます。これらは、**FileExportParams** オブジェクトの [**FileNamePattern**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fileexportparams.md#filenamepattern) プロパティおよび **ImageExportParams** オブジェクトの [**Prefix**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageexportparams.md#prefix) プロパティで定義されます。

なお、[**IExportProfiles::AddNew**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/exportprofiles-addnew.md) メソッドを使用して、複数のエクスポートプロファイル (処理済みデータの扱い方を決定する設定のセット) を構成することもできます。その場合、メモリへのエクスポートに該当するすべてのエクスポートプロファイルが順番に使用されます。

> [!NOTE]
>
> メモリへのエクスポートでサポートされるのは、[**DestinationType**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/exportparams.md#destinationtype) プロパティの値が **EDT\_File** (ファイルへのエクスポート) であるエクスポートプロファイルのみです。エクスポート先がそれ以外の値に設定されたエクスポートプロファイルは無視されます。

## 構文

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

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

## パラメーター

**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) プロパティのエクスポートパラメーターが使用されます。

**Result**

\[out, retval] エクスポートされたドキュメントの結果を受け取る [**IVirtualFileSystemNode**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/virtualfilesystemnode.md)\*\*\*\*\* オブジェクトへのポインター。

## 戻り値

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

## サンプル

次のコードサンプルを参照してください：[ExportToMemory](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/project-exporttomemory.md#samples)

## 関連項目

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