To Aspose Development Team or any Aspose Expert:
We are trying to merge/print multiple records from a DataTable using a single Word document. The problem we are facing right now is that it prints only the last record in the DataTable.
For Each Row In DataTable.Rows
Dim doc as Aspose.Word.Document = New Aspose.Word.Document("C:\WordDocument.doc")
' Get the license file
' doc.Save("WordDocument.doc", Aspose.Word.SaveFormat.FormatDocument, Aspose.Word.SaveType.OpenInWord, Me.Response)
The problem is that Aspose does not open/print the document until the End Sub is executed which results in only the last record in the datatable to be printed. How do we merge and print this word document for all records in the datatable?
Appreciate your prompt response and thanks in advance,