Hi,
I am currently using the Aspose.Words Java version. One of the thing I am doing is merging multiple word documents into single word documents and once this is done, I insert a new TOC which reflect all multiple merged documents.
My problem is, when a document already has a TOC and i use document.update to update the final TOC, it updates both TOC (inserted one and the one that was original there in the document).
Is there a way, i can prevent this behavior and only update the TOC i am inserting programmatically and no the original one.
To reproduce:
Generate 2 Word document with TOC (insert multiple document with TOC).
Insert TOC programmatically using
builder.insertTableOfContents("\o "1-3" \h \z \u");
and finally at the end of the merge, do a doc.update();
All the TOC will be updated.
Please let me know if you need any more inforamtion from my side.
Thanks,
Kunal