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

# RemoveAttachment

> Call RemoveAttachment in the ABBYY FlexiCapture API to delete an attachment by name from a document, page, or batch on the Application Server.

## What it does

Removes attachment

## Definition

```
void RemoveAttachment( int sessionId, int type, int objectId, int batchId, int projectId, string fileName );Vf
```

## Parameters

<table width="100%"><tbody><tr><td><p><strong>Name</strong></p></td><td><p><strong>Type</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p>session</p></td><td><p>int</p></td><td><p>The ID of the connection to the Application Server</p></td></tr><tr><td><p>type</p></td><td><p>int</p></td><td><p>Type of attachment. Possible values</p><ul><li><strong>9</strong> - attachment to a document;</li><li><strong>10</strong> - attachment to a page;</li><li><strong>11</strong> - attachment to a batch.</li></ul></td></tr><tr><td><p>objectId</p></td><td><p>int</p></td><td><p>The ID of the object</p></td></tr><tr><td><p>batchId</p></td><td><p>int</p></td><td><p>The ID of the batch</p></td></tr><tr><td><p>projectId</p></td><td><p>int</p></td><td><p>The ID of the project</p></td></tr><tr><td><p>fileName</p></td><td><p>string</p></td><td><p>Name of attachment to be deleted</p></td></tr></tbody></table>

## Returned value

None.
