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

# DoCommand Method of the Commands Object

> DoCommand method of the Commands Object in ABBYY FineReader Engine Visual Components on Windows — This method executes the specified command in synchronous or asynchronous mode.

This method executes the specified command in synchronous or asynchronous mode.

## Syntax

### C++

```cpp theme={null}
HRESULT DoCommand(
  MenuItemEnum Value,
  VARIANT_BOOL DoSynchronously
);
```

### C\#

```csharp theme={null}
void DoCommand(
  MenuItemEnum Value,
  bool         DoSynchronously
);
```

### Visual Basic .NET

```vb theme={null}
Sub DoCommand( _
  Value As MenuItemEnum, _
  DoSynchronously As Boolean _
)
```

## Parameters

Value

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

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

DoSynchronously

\[in] Specifies whether this method works synchronously or not.

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

## See also

[Commands](/fine-reader/engine/visual-components-reference/supplementary-objects/commands)
