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

# Page オブジェクトの SetFieldRegion メソッド

このメソッドは、指定した [**Field**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/field.md) オブジェクトについて、field の領域を設定します。field を移動したり再学習したりする場合に使用できます。

> [!NOTE]
>
> 指定する field の名前にはスペースを含めないでください。スペースが含まれていると、その field を学習できません。

## 構文

```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
);
```

## パラメーター

**Field**

\[in] この変数は、field を [**Field**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/field.md) オブジェクトとして指定します。

**Regions**

\[in] field の領域を指定する [**RegionsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/regionscollection.md) オブジェクトを参照します。なお、field がドキュメント内に複数回出現する場合、その field は複数の領域を持つことがあります。

**IsModified**

\[in] field の領域が移動された場合は、この変数を TRUE に設定する必要があります。それ以外の場合、このパラメーターの値は FALSE になります。

## 戻り値

このメソッドには固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## サンプル

このメソッドは、次のコード サンプルで使用されています。[請求書の処理と学習](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining)

## 関連項目

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