ITextDocument::Range method (tom.h)
Retrieves a text range object for a specified range of content in the active story of the document.
Syntax
HRESULT Range(
long cpActive,
long cpAnchor,
ITextRange **ppRange
);
Parameters
cpActive
Type: long
The start position of new range. The default value is zero, which represents the start of the document.
cpAnchor
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | tom.h |
DLL | Msftedit.dll |
See also
Conceptual
Reference