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

# AddFromFile Method of the PDFAttachments Object

This method adds a specified file to the collection of PDF attachments.

## Syntax

### C++

```cpp theme={null}
HRESULT AddFromFile(
  BSTR             Path,
  BSTR             FileName,
  BSTR             Description,
  IPDFAttachment** Result
);
```

### C\#

```csharp theme={null}
IPDFAttachment AddFromFile(
  string Path,
  string FileName,
  string Description
);
```

### Visual Basic .NET

```vb theme={null}
Function AddFromFile( _
  Path As String, _
  [FileName As String = "0"], _
  [Description As String = "0"] _
) As IPDFAttachment
```

## Parameters

Path

\[in] Specifies the full path to the attachment file.

FileName

\[in] Specifies the name of the attachment file. This parameter is optional and may be empty string, in which case the filename is obtained from the path.

Description

\[in] Contains a user-defined description of the attachment file. This parameter is optional and may be empty string.

Result

\[out, retval] A pointer to [IPDFAttachment](/fine-reader/engine/api-reference/document-related-objects/pdfattachment)\* pointer variable that receives the interface pointer of the object representing the added attachment.

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

[PDFAttachments](/fine-reader/engine/api-reference/document-related-objects/pdfattachments)
