Free Support Forum - aspose.com

Table of contents. Two documents in one

I need to insert two documents in one and make a table of contents, which will be contains lnks to each of imported documents. How can I do it?

Hello

Thanks for your request. Please see the following link to learn how to insert one document into another:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/howto-insert-a-document-into-another-document.html

If you just need to append the specified document to the end of current document, you can try using appendDocument method:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/document.html#appendDocument(com.aspose.words.Document, int)

You can use insertTableOfContents method to create TOC from scratch:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/documentbuilder.html#insertTableOfContents(java.lang.String)

Please let me know if you need more assistance, I will be glad to help you.

Best regards,