Hi
Thanks for your inquiry. Yes, I think that you can achieve this using Aspose.Words. For example see the following code. Also see attachment.
DataTable table = new DataTable();
table.Columns.Add("Field1");
table.Columns.Add("Field2");
table.Columns.Add("Field3");
DataRow row = table.NewRow();
row[0] = "test1";
row[1] = "test2";
row[2] = "test3";
table.Rows.Add(row);
// open templates
Document doc1 = new Document(@"367_103139_runtoofar\in1.doc");
Document doc2 = new Document(@"367_103139_runtoofar\in2.doc");
Document doc3 = new Document(@"367_103139_runtoofar\in3.doc");
// execute mail merge
doc1.MailMerge.Execute(table);
doc2.MailMerge.Execute(table);
doc3.MailMerge.Execute(table);
// merge documents
foreach (Section sect in doc2.Sections)
{
doc1.Sections.Add(doc1.ImportNode(sect, true, ImportFormatMode.KeepSourceFormatting));
}
foreach (Section sect in doc3.Sections)
{
doc1.Sections.Add(doc1.ImportNode(sect, true, ImportFormatMode.KeepSourceFormatting));
}
// save document
doc1.Save(@"367_103139_runtoofar\out.doc");
I hope that this will help you.
Please let me know if you would like to know something else.
Best regards.