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

# LoadImageDocFromFile Method of the Engine Object

This method restores the contents of the [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument) object from the file previously saved with the help of the [IImageDocument::SaveToFile](/fine-reader/engine/api-reference/image-related-objects/imagedocument/savetofile-method) method.

## Syntax

### C++

```cpp theme={null}
HRESULT LoadImageDocFromFile(
  BSTR             FileName,
  IImageDocument** Result
);
```

### C\#

```csharp theme={null}
IImageDocument LoadImageDocFromFile( string FileName );
```

### Visual Basic .NET

```vb theme={null}
Function LoadImageDocFromFile(FileName As String) As IImageDocument
```

## Parameters

FileName

\[in] This variable contains a full path to the file with image document.

Result

\[out, retval] A pointer to IImageDocument\* pointer variable that receives the interface pointer of the resulting [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument) object. Must not be NULL.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface)

[IImageDocument::SaveToFile](/fine-reader/engine/api-reference/image-related-objects/imagedocument/savetofile-method)
