ITextDocument::Range method
Retrieves a text range object for a specified range of content in the active story of the document.
Syntax
HRESULT Range( long cpFirst, long cpLim, ITextRange **ppRange );
Parameters
- cpFirst
-
Type: long
The start position of new range. The default value is zero, which represents the start of the document.
- cpLim
-
Type: long
The end position of new range. The default value is zero.
- ppRange
-
Type: ITextRange**
Address of a pointer to a variable of type ITextRange that receives a pointer to the specified text range.
Return value
Type: HRESULT
If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information on COM error codes, see Error Handling in COM.
| Return code | Description |
|---|---|
|
Invalid argument. |
|
Insufficient memory. |
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Header |
|
|
DLL |
|
See also
- Reference
- ITextDocument
- ITextRange
- Conceptual
- Text Object Model
Send comments about this topic to Microsoft
Build date: 10/27/2012