Working With Lists

A list in a Microsoft Word document is a set of list formatting properties. Lists can be used in your documents to format, arrange, and emphasize text. Lists are a great way to organize data in documents, and they make it easier for readers to understand key points.

Each list can have up to 9 levels and formatting properties, such as number style, start value, indent, tab position etc are defined separately for each level.

In Aspose.Words, working with lists is represented by the Lists namespace. However, the List object always belongs to the ListCollection collection.

This topic describes how to work programmatically with lists using Aspose.Words.

Specify Formatting for a List Level

List-level objects are created automatically when a list is created. Use the properties and methods of the ListLevel class to control the formatting of individual levels of a list.

Restart List for each Section

You can restart a list for each section using the IsRestartAtEachSection property. Note that this option is supported only in RTF, DOC and DOCX document formats. This option will be written to DOCX only if OoxmlCompliance is higher then Ecma376.

The following code example shows how to create a list and restart it for each section: