Mailmerge : producing multiple document from one template

Hi Aspose Team,
I’ve a word template with mailmerge for an invoice.
I need to mailmerge the document for each customer.
ex: If I’ve 5 customer, I need 5 separate word doccument.
Is this code the right way to do? Is there a better way to do this (regarding performance)?

Document m = new Document(@"E:\test.doc";);
Document doc = m.Clone();
doc.MailMerge.Execute(new string[1]
{
    "customerName"
}, new string[1]
{
    "customerName_1"
});
doc.Save(@"E:\test1.doc");
doc = m.Clone();
doc.MailMerge.Execute(new string[1]
{
    "customerName"
}, new string[1]
{
    "customerName_2"
});
doc.Save(@"E:\test2.doc");

Thanks

Hi

Thanks for your inquiry. Yes, you are in the right direction. Please see the following link to learn how to produce multiple documents during mail merge:
https://docs.aspose.com/words/net/types-of-mail-merge-operations/
Hope this helps.
Best regards.