Professional Documents
Culture Documents
Use ITextTarget::QueryTextModel to get the text model for the selection. This interface provides other
information about the text selection, like its range.
To manipulate the model through the selection, add a new suite interface onto the kTextSuiteBoss class.
This provides the mechanism required to keep actual selection types separate from the selection
architecture. For an example, see the use of the interface IDataUpdaterSuite in the XmlDataUpdater
plug-in.
Solution
Sample code
SnpManipulateTextFrame
Creating a story
You can create a story programmatically.
Solution
Stories are rarely created directly. Normally, they are created as a side effect of creating a text frame.
Sample code
SDKLayoutHelper::CreateTextFrame
Related APIs
The kNewStoryCmdBoss command creates a new story. It is unlikely you will have to use this
command directly.
The kCreateMultiColumnItemCmdBoss command creates a text frame (and the associated story).
Deleting a story
You can delete a story programmatically.