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

# Engine オブジェクトの LoadImageDocFromFile メソッド

このメソッドは、[**ImageDocument**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument.md) オブジェクトの内容をファイルから復元します。

## 構文

```vb Visual Basic .NET theme={null}
Function LoadImageDocFromFile(fileName As String) As ImageDocument
```

```cpp C++ theme={null}
HRESULT LoadImageDocFromFile(
  BSTR             fileName,
  IImageDocument** result
);
```

## パラメーター

**fileName**

\[in] **ImageDocument** オブジェクトの内容を含むファイルのフルパスを指定します。

**result**

\[out, retval] 作成された [**ImageDocument**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument.md) オブジェクトのインターフェースポインターを受け取る **IImageDocument**\* ポインター変数へのポインター。NULL は指定できません。

## 戻り値

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

## 関連項目

[**Engine**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine.md) [**ImageDocument::SaveToFile**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savetofile.md)
