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

Free Support Forum - aspose.com

Insert TOC field and text with Heading 1 style generates incorrect output using .NET

In my project user can upload a word template in that i will find certain tokens and replace it with some data(including html ) and generate word document. Each converted data has to be taken the same font and paragraph format of the corresponding token. Among those token, one token(details) has to print some details with heading and content. In heading style identifier should be heading 1 and for content its normal. In the heading 1 style if any bullet style is selected that is getting applied in the title( that should not happens). I am attaching my sample code with template, output and expected_output(inside resource folder) TokenstyleIssue (2).zip (70.8 KB). Please help me to fix this issue as soon as possible.

Thank you


Please note that Aspose.Words mimics the behavior of MS Word. If you perform the same scenario using MS Word i.e. insert TOC field and text with Heading 1 style, you will get the same output. To get the desired output, please modify the styles in the template document.