How to insert a document's body into another document

I have two DOCX document, one of them (let’s call it A) containing a placeholder like “#HERE#”. I want to open A, find the placeholder (so far no problem, I found the Run containing #HERE#) and replace it with the contents (only the body, not header, footer oder metadata) of document B.
Is this possible? I guess, I have find some kind body root node in document B and append all it’s children to the parent of the Run in document A, is this correct?
Do you have some sample code, that does this or something similar?

Hello
Thanks for your request. I think in this case you can try using the InsertDocument method provided in this article:
https://docs.aspose.com/words/java/insert-and-append-documents/
Please let me know in case of any issues. I will be glad to help you.
Best regards,

Thanks, that did it :slight_smile:

@sehar236 I have already answered you in another thread:
https://forum.aspose.com/t/copy-and-paste-content-of-word-document-into-another/54406/11

I have accidentally made my post private and i cant access it now.

@sehar236 I have moved you posts into a separate topic:
https://forum.aspose.com/t/copy-and-insert-content-of-word-document-into-another/276682
Now you are an owner of this topic.