Skip to main content
A newer version of this page is available. .

Characters

Document ranges are composed of characters. To obtain a string of characters for a particular range, use the SubDocument.GetText method.

Characters can be formatted directly by specifying settings for font, font size, character style: bold, italics, underlined, strike-through; and different colors for background and foreground. To modify the formatting of characters in a range, use the SubDocument.BeginUpdateCharacters - SubDocument.EndUpdateCharacters method pair. It provides you with access to the CharacterProperties interface that enables you to either get character formatting or change it.

The CharacterProperties.Style property makes it possible for you to apply a character style to a range.

There is a number of commands to help you with character formatting. For more information, see the Text Formatting topic.