Skip to main content
ITextStoryRanges2::Item2 method

Gets an ITextRange2 object for a story, by index, in a stories collection.

Syntax


HRESULT Item2(
  [in]           long Index,
  [out, retval]  ITextRange2 **ppRange
);

Parameters

Index [in]

Type: long

The index of the story range. The default value is 1.

ppRange [out, retval]

Type: ITextRange2**

The range.

Return value

Type: HRESULT

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

Remarks

The first story has an index of 1, and the last story has an index equal to the count retrieved by the ITextStoryRanges::GetCount method. Negative index values count from the last story to the first; that is, an index of –1 gets the last story in the collection, and an index of –count gets the first story.

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

ITextStoryRanges2