We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

TOC levels

Is there a way to specify 4 levels in the TOC?

Thanks, mlb

Hi Michelle,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Yes there is, please use the code below

builder.InsertTableOfContents("\\o \"1-4\" \\h \\z \\u");

The only difference from the usual TOC setting is that 1-3 is changed to 1-4, allowing four nested levels in the contents page.

To format a title as the forth nested level use this code:

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading4;