Working With Control Characters

Contents
[ ]

Microsoft Word documents may contain various characters that have a special meaning. Normally they are used for formatting purposes and are not drawn in the normal mode. You can make them visible if you click the Show/Hide Formatting Marks button located on the Standard toolbar.

Sometimes you may need to add or remove characters to/from the text. For instance, when obtaining text programmatically from the document, Aspose.Words preserves most of the control characters, so if you need to work with this text you should probably remove or replace the characters.

The ControlChar class is a repository for the constants that represent control characters often encountered in documents. It provides both char and string versions of the same constants. For example, string LineBreak and char LineBreakChar has the same value.

The following code example shows how to use control characters:

/words/net/working-with-content-control-sdt/)