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

# RecognizeBlocks Method of the Document Object

This method allows you to recognize a collection of blocks in the document.

## Syntax

```vb Visual Basic .NET theme={null}
Sub RecognizeBlocks(Blocks As BlocksCollection)
```

```cpp C++ theme={null}
HRESULT RecognizeBlocks(
  IBlocksCollection* Blocks
);
```

## Parameters

**Blocks**

\[in] Refers to the [**BlocksCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blockscollection.md) object, which contains the blocks to be recognized.

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

## Samples

> [accordion] C++ (COM) code
>
> ```cpp theme={null}
> FCEngine::IEnginePtr Engine;
> ...
> FCEngine::IBlockPtr block;
> FCEngine::IDocumentPtr document;
> FCEngine::IBlocksCollectionPtr blocks = Engine->CreateBlocksCollection();
> blocks->Add(block);
> ...
> document->RecognizeBlocks(blocks);
> ```

## See also

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