I am using Aspose word 18.9. We know that the default way to insert Table of content is :
builder.InsertTableOfContents("\o “1-3” \h \z \u");
Here Only H1-H3
tags will be considered for TOC. But Header tags create extra spaces in the content which I don’t want.
So I want to use user-defined tag for TOC. Currently I have created user-defined tag toc
.
For example:
<toc>Heading 1</toc>
<toc>Heading 2</toc>
I want this tag to be used to build the TOC.
Is there any way to do so?
Please help!