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

# CreateText Method of the Engine Object

This method creates a [**Text**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/text.md) object from the specified string.

## Syntax

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

## Parameters

**str**

\[in] This variable contains the string, which should be used for a new **Text** object creation.

**charParams**

\[in] This variable refers to the [**CharParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/charparams.md) object, which contains the character parameters that should be associated with the newly created text. This parameter may be 0, in which case the default character parameters will be used.

**result**

\[out, retval] A pointer to the **IText\*** pointer variable that receives the interface pointer of the newly created [**Text**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/text.md) object.

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

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

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