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

# Engine オブジェクトの CreateText メソッド

このメソッドは、指定された文字列から [**Text**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/text.md) オブジェクトを作成します。

## 構文

```vb Visual Basic .NET theme={null}
Function CreateText( _
  str As String, _
  charParams As CharParams _
) As Text
```

```cpp C++ theme={null}
HRESULT CreateText(
  BSTR         str,
  ICharParams* charParams,
  IText**      result
);
```

## パラメーター

**str**

\[in] この変数には、新しい **Text** オブジェクトの作成に使用する文字列が格納されます。

**charParams**

\[in] この変数は、新しく作成するテキストに関連付ける文字パラメーターを格納した [**CharParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/charparams.md) オブジェクトを参照します。このパラメーターには 0 を指定できます。その場合は、デフォルトの文字パラメーターが使用されます。

**result**

\[out, retval] 新しく作成された [**Text**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/text.md) オブジェクトのインターフェースポインターを受け取る **IText**\* ポインター変数へのポインター。

## 戻り値

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

## 関連項目

[**Engine**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine.md)

[**Text**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/text.md)
