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

# コレクションオブジェクトの InsertAt メソッド

このメソッドは、コレクション内の指定した位置に新しい要素を挿入します。

## 構文

```vb Visual Basic .NET theme={null}
Sub InsertAt( _
  Value As <CollectionType>, _
  Index As Integer _
)
```

```cpp C++ theme={null}
HRESULT InsertAt(
  <CollectionType> Value,
  int              Index
);
```

## パラメーター

**Value**

\[in] このパラメーターには、新しく挿入する要素を指定します。その型はコレクションの型によって異なります。詳細は次の表のとおりです。

| **コレクションの型** | **要素型 (Visual basic/C++)** |
| - | - |
| [**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md) | String/BSTR |
| [**IntsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/intscollection.md) | Integer/int |

**Index**

\[in] このパラメーターには、新しく挿入する要素のインデックスを指定します。既存の要素の位置に挿入すると、コレクションの要素は右にシフトされます。要素はコレクションの末尾に挿入することもできます。その場合、このパラメーターの値は [**Count**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/count.md) プロパティの値と等しくする必要があります。

## 戻り値

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

## 関連項目

[コレクションの操作](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/collections.md)
