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

# ExtractTextRegions Method of the Page Object

This method extracts text regions on the page. It allows you to access all background text on the recognized page, which might then be used for various purposes, such as indexing the documents for a future search, moving a block to the selected text, etc.

> [!WARNING]
>
> This method works with flexible documents only.

## Syntax

```vb Visual Basic .NET theme={null}
Function ExtractTextRegions() As TextRegions
```

```cpp C++ theme={null}
HRESULT ExtractTextRegions(
  ITextRegions** result
);
```

## Parameters

**result**

\[out, retval] A pointer to the [**ITextRegions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/textregions.md)**\*** variable that receives the interface pointer for the collection of all text regions found on the page.

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

## See also

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

[See sample](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md): FlexiCapture SDK Code Snippets
