> ## 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 Method of the Toolbar Object

> InsertAt method of the Toolbar Object in ABBYY FineReader Engine Visual Components on Windows — This method inserts a button or separator into the specified position in the toolbar.

This method inserts a button or separator into the specified position in the toolbar.

## Syntax

### C++

```cpp theme={null}
HRESULT InsertAt(
  MenuItemEnum CommandId,
  int          Index
);
```

### C\#

```csharp theme={null}
void InsertAt(
  MenuItemEnum CommandId,
  int          Index
);
```

### Visual Basic .NET

```vb theme={null}
Sub InsertAt( _
  CommandId As MenuItemEnum, _
  Index As Integer
)
```

## Parameters

CommandId

\[in] Specifies the element to be added to the toolbar as a [MenuItemEnum](/fine-reader/engine/visual-components-reference/enumerations/menuitemenum) constant. See the list of available elements:

[Image Viewer commands](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands)<br />[Text Editor commands](/fine-reader/engine/visual-components-reference/texteditor/text-editor-commands)

Index

\[in] Specifies the position of the element in the toolbar. Must be in a range from 0 to the value of the [IToolbar::Count](/fine-reader/engine/visual-components-reference/supplementary-objects/toolbar#count) property. This variable can be set to -1. In this case, the element will be inserted at the end of the toolbar.

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

## Remarks

Before inserting a command, make sure that it is not already on the toolbar.

## See also

[Toolbar](/fine-reader/engine/visual-components-reference/supplementary-objects/toolbar)

[Delete](/fine-reader/engine/visual-components-reference/supplementary-objects/toolbar/delete-method)
