Hello,
I'm using the following code to generate a Word document with a table using mail merge. The sample document is attached.
The file does get generated but no rows are added to the table. I'm running this in VS2022 and .NET 6.
Any advice will be appreciated.
Regards,
Waseem
Spire.Doc.Document doc = new Spire.Doc.Document();
doc.LoadFromFile("Sample_3.doc");
var Dt = new DataTable("Items");
Dt.Columns.Add("ItemNumber", typeof(string));
Dt.Columns.Add("ItemDescription", typeof(string));
Dt.Rows.Add("2.1", "title 1");
Dt.Rows.Add("2.2", "title 2");
Dt.Rows.Add("2.3", "title 3");
doc.MailMerge.ExecuteWidthRegion(Dt);
doc.SaveToFile("Result.docx", FileFormat.Docx2013);