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

Free Support Forum - aspose.com

Table of Content Fails to follow the document headings formats

The table of content is not having the same font as the document headings. As indicated in the attached document, the table of contents gets updated as we change the document headings font using the “word application” but we cannot achieve the same result using “Aspose”


Hi Nina,

Thanks for your inquiry. Unfortunately, I have not understood your query. It would be great if you please share some more detail about your query. Please also share following detail for our reference.

  • Please attach your input Word document.
  • Please
    attach your target Word document showing the desired behavior. You can
    use Microsoft Word to create your target Word document. I will
    investigate as to how you are expecting your final document be generated
  • Please share some detail about your shared documents (Toc.docx, SampleXmlToPassToAspose.xml)
  • Please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code you used to generate your output document


Toc.docx is the target document showing the expected behavior(created by MS word)

SampleXmlToPassToAspose.xml, is the sample we are passing to the Aspose.

I also attached a new document named “actualResult” which demonstrate the output document using Aspose( you can see the table of content is not following the font format of the document headings)



Hi Nina,

Thanks for the additional information. While using the latest version of Aspose.Words i.e. 14.5.0, I managed to reproduce this issue on my side. I have logged a Priority Support level issue in our bug tracking system. The ID of this issue is WORDSNET-10392. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Documents used to reproduce this issue and screenshot showing the comparison are attached with this post. Here is the code we used to reproduce this issue on our end:

Document doc = new
Document(MyDir + @“SampleXmlToPassToAspose.xml”);


doc.Save(MyDir + @“out-awnet-14.5.0.docx”);

Best regards,

The issues you have found earlier (filed as WORDSNET-10392) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.