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

# SetFieldRegion Method of the Page Object

This method sets the region of the field for the specified [**Field**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/field.md) object. You may use this method for moving or retraining the field.

> [!NOTE]
>
> The name of the specified field must not contain spaces, otherwise it couldn't be trained.

## Syntax

```vb Visual Basic .NET theme={null}
Sub SetFieldRegion( _
    Field As Field, _
    Regions As RegionsCollection, _
    IsModified As Boolean _
)
```

```cpp C++ theme={null}
HRESULT SetFieldRegion(
  IField*  Field,
  IRegionsCollection* Regions,
  VARIANT_BOOL        IsModified
);
```

## Parameters

**Field**

\[in] This variable specifies the field as the [**Field**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/field.md) object.

**Regions**

\[in] Refers to the [**RegionsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/regionscollection.md) object that specifies the regions of the field. Note that the field may have several regions if it occurs several times in the document.

**IsModified**

\[in] You must set this variable to TRUE if the region of the field was moved. Otherwise the value of this parameter is FALSE.

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

This method is used in the following code samples: [Invoices Processing and Training](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining).

## See also

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