Skip to main content
ITextStoryRanges2 interface

The ITextStoryRanges2 interface enumerates the stories in an ITextDocument.

You get a pointer to an ITextStoryRanges2 collection by using the ITextDocument::GetStoryRanges method. Each story obtained from this collection is represented by an ITextRange2 object that covers the whole story.

A Text Object Model (TOM) implementation that has only a single story doesn't need to implement the ITextStoryRanges2 interface. An implementation of this interface should only retrieve a stories collection if ITextDocument::GetStoryCount returns a story count greater than one.

When to implement

Applications typically do not implement the ITextStoryRanges2 interface. Microsoft text solutions, such as rich edit controls, implement ITextStoryRanges2 as part of their TOM implementations.

When to use

Applications can retrieve an ITextStoryRanges2 pointer from a rich edit control by calling the ITextDocument2::GetStoryRanges2 method.


The ITextStoryRanges2 interface inherits from ITextStoryRanges. ITextStoryRanges2 also has these types of members:


The ITextStoryRanges2 interface has these methods.


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



Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]