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

# Range Method of the Paragraph Object

This method returns a substring from the text of the paragraph.

## Syntax

### C++

```cpp theme={null}
HRESULT Range(
  int   FromPos,
  int   ToPos,
  BSTR* String
);
```

### C\#

```csharp theme={null}
string Range(
  int FromPos,
  int ToPos
);
```

### Visual Basic .NET

```vb theme={null}
Function Range( _
  FromPos As Integer, _
  ToPos As Integer _
) As String
```

## Parameters

FromPos

\[in] Position where the substring is started. Must be not less than 0 and not greater than the length of paragraph.

ToPos

\[in] Position where the substring is ended. Must be not less than variable FromPos and 0 and not greater than the length of paragraph.

String

\[out, retval] A pointer to BSTR variable that receives the substring that is started at FromPos position and is ended to ToPos position. Must not be NULL.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[Paragraph](/fine-reader/engine/api-reference/text-related-objects/paragraph)

[CharParams](/fine-reader/engine/api-reference/text-related-objects/charparams)
