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

# Delete Method of the Text Object

This method removes a range of text specified by the positions of symbols.

## Syntax

```vb Visual Basic .NET theme={null}
Sub Delete( _
  From As Integer, _
  To As Integer _
)
```

```cpp C++ theme={null}
HRESULT Delete(
  int From,
  int To
);
```

## Parameters

**From**

\[in] The variable specifies the index of character in the text for the starting point of the range to be removed.

**To**

\[in] The variable specifies the index of character in the text for the ending point of the range to be removed. This character itself is not removed from the text.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Remarks

The ending position for the text to be removed should be farther in the text than the starting one, otherwise an error code is returned. The symbol in *From* position is removed from the text, while the character in *To* position is not removed.

## See also

[**Text**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/text.md)

[**IText::Insert**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/text-insert.md)
