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

Free Support Forum - aspose.com

Table of Contents in ASPOSE.WORDS

Hi,

I am using ASPOSE.WORDS for .NET 4.4.2.

I am struggling trying to create numbered paragraphs by cloning paragraphs from another document and adding them like this:

var clonedSubSectionParagraph = (Paragraph)subSectionParagraph.Clone(true);

clonedSubSectionParagraph.Runs[0].Text = subSection.Title;

clonedSection.Body.Paragraphs.Insert(counter, clonedSubSectionParagraph);

I am guessing there is a better way of doing this.

I am cloning from an existing template document as I don't want to hard code the style into the document.

Also Is it possible to update the table of contents in 4.4.2?

Thanks

Paul

Hi

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

Thanks for your request. If you need to create List, please see the following link to learn how to achieve that.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/list-formatting.html

Unfortunately, Aspose.Words cannot update TOC fields, so you should update it manually in MS Word.

Best regards.