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

# Text オブジェクトの Delete メソッド

このメソッドは、文字位置で指定されたテキスト範囲を削除します。

## 構文

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

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

## パラメーター

**From**

\[in] 削除する範囲の開始点となる、テキスト内の文字のインデックスを指定する変数です。

**To**

\[in] 削除する範囲の終了点となる、テキスト内の文字のインデックスを指定する変数です。この位置の文字自体はテキストから削除されません。

## 戻り値

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

## 備考

削除するテキストの終了位置は、開始位置よりも後ろにある必要があります。そうでない場合は、エラーコードが返されます。*From* の位置にある文字はテキストから削除されますが、*To* の位置にある文字は削除されません。

## 関連項目

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

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