Free Support Forum - aspose.com

1st record repeated twice

I’ve a template created using Insert->Field->MergeField into a table.

After executing the MailMerge via mainDoc.MailMerge.Execute(objReader), I realized that the 1st record is appearing 2 times. For eg, if there’re 2 records, it looks something like:

company 1
addr1

company 1
addr2

company 2
addr2

??? Help…

Thanks,
Ben

For Aspose.Word to select next record it should either reach end of mail merge region, end of document or a NEXT field. What happens in your case?

I think if you email your document to word@aspose.com and briefly explain what you want to achieve we will sort it out quickly.

Hi Ben,

Your document is structured correctly, but I found you need a NEXT field before the first record too.

When you do your first mail merge for the group header it seems like it eats the NEXT field between first and second detail records in the table. It is probably not the expected behaviour from Aspose.Word and I will investigate it in details later, but you can just insert NEXt field before the first detail record too.