ITextDocument2::Range2 method

Retrieves a new text range for the active story of the document.

Syntax


HRESULT Range2(
  [in]          long        cpActive,
  [in]          long        cpAnchor,
  [out, retval] ITextRange2 **ppRange
);

Parameters

cpActive [in]

Type: long

The active end of the new text range. The default value is 0; that is, the beginning of the story.

cpAnchor [in]

Type: long

The anchor end of the new text range. The default value is 0.

ppRange [out, retval]

Type: ITextRange2**

The new text range.

Return value

Type: HRESULT

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

ITextDocument2

 

 

Show: