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

Free Support Forum - aspose.com

Merge documents

Hello,

I have a word template and I generate the doc with following instruction:

doc.getMailMerge().setCleanupOptions(MailMergeCleanupOptions.REMOVE_UNUSED_FIELDS);
doc.getMailMerge().execute(
new String[] {
“field_1”,
“field_2”,
“field_3”,
“field_4”,
“field_N”,
},
new Object[] {
dataset.getField__1(),
dataset.getField__2(),
dataset.getField__3(),
dataset.getField__4(),
dataset.getField__N()
}
);

dataset is an instance of an obect called MyDataset

But, if I a list of MyDatasets objects, I would generate a document that contains singles documents one for each item MyDataset.

Thanks in advance

Alessio



Hi Alessio,


Thanks for your inquiry. Please check following documentation link to generate multiple documents form a DataSet. Hopefully it will help you to accomplish the task. However, if you face any issue then please share your sample working code (without compilation errors) along with template document. We will test the scenario at our end and will guide you accordingly.


Best Regards,