ITextRange::GetDuplicate method

Gets a duplicate of this range object.

Syntax


HRESULT GetDuplicate(
  ITextRange **ppRange
);

Parameters

ppRange

Type: ITextRange**

The duplicate of the range.

Return value

Type: HRESULT

The method returns an HRESULT value. If the method succeeds, it returns S_OK. If the method fails, it returns one of the following error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
E_INVALIDARG

ppRange is null.

E_FAIL

Failure for some other reason.

 

Remarks

To create an insertion point in order to traverse a range, first duplicate the range and then collapse the duplicate at its start character position. Note, a range is characterized by start and end character positions, and the story it belongs to.

Even if the range is actually an ITextSelection, the duplicate returned is an ITextRange. For an example, see the ITextRange::FindText method.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextRange
FindText
Conceptual
Text Object Model

 

 

Community Additions

ADD
Show:
© 2014 Microsoft