Hi
Thanks for your inquiry. I think the simplest way to achieve what you need is using Mail Merge with regions.
https://docs.aspose.com/words/net/types-of-mail-merge-operations/
I created simple example for you. Here is code:
//Create dummy datasource
DataTable table = new DataTable("Labels");
table.Columns.Add("Name");
table.Columns.Add("Address");
//Add few rows
table.Rows.Add(new object[] { "John Smith", "123 Polk Street" });
table.Rows.Add(new object[] { "Isabelle Beaudoin", "3443 Berri" });
table.Rows.Add(new object[] { "Demetra Jolie", "444 Hello Street" });
table.Rows.Add(new object[] { "Thu Nguyen", "23 Hanoi" });
//Open template
Document doc = new Document(@"Test012\in.doc");
//execute mail merge with regions
doc.MailMerge.ExecuteWithRegions(table);
//Save output document
doc.Save(@"Test012\out.doc");
Template and output document are attached.
I used the following structure of the template:
{ TableStart:Labels }{ Name }{ Address }|{NEXT}{ Name }{Address}{ TableEnd:Labels }
NEXT field is needed to move to the next record in the datasource. (You can press Alt+F9 to see field codes in the template)
Hope this helps.
Best regards.