We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert Document using merge field into another document

I have a requirement where i need to insert entire content of a word document into another document at a particular location. This is what i was trying to do:

DocumentBuilder builder = new DocumentBuilder(desDoc);
builder.moveToDocumentStart();
builder.moveToMergeField("nameOfMergeField");

Document srcDoc = new Document("Path of source word doc");

builder.insertNode(/*Dont know how to get the srcDoc as a node*/);

How can i get the entire source document as a node or is there some other way of doing what i am trying to do?

Please let me know.

Thanks,
Kedar

Please note that i don’t want to insert src document as a new page/section into the new document but just the content of the src document into the des document and the formatting of the destination document should be retained.

I was able to do it using a examplein the documentation…thanks…

Hi Kedar,

Thank you for inquiry. It is great to hear that you managed to resolve it. You are always welcome and please feel free to ask if you have any query in future.
We always welcome constructive response from our customers.