Free Support Forum - aspose.com

Inserting Text from bookmarked location to end of document in one document into destination doc

Using Java.words I would like to insert text from a bookmarked point in one file to the end of the same document into the destination document. I understand that I can use NodeImporter to import an entire file but I would like to being importing at a bookmarked starting point.


This message was posted using Page2Forum from NodeImporter Class - Aspose.Words for .NET

Hi

Thanks for your request. You can try using the technique described here to extract content of bookmark into a separate document:

https://forum.aspose.com/t/74740

The provided code is in C#, but I think there will not be problems to translate it to Java.

After extracting, you can use either InsertDocument or AppendDocument methods to insert content into your document:

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

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

Best regards,