Hi
Thanks for your inquiry. You can build document from scratch or use mail merge to fill the template with data. For example you can use the following code to insert a table into the document using Document Builder.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
InsertTable(builder, objDS.Tables[0]);
doc.Save(@"052_88865_dyross\out2.doc");
///
/// Insert Table to document
///
public void InsertTable(DocumentBuilder builder, DataTable table)
{
builder.StartTable();
foreach (DataRow row in table.Rows)
{
foreach (object cell in row.ItemArray)
{
builder.InsertCell();
builder.Write(cell.ToString());
}
builder.EndRow();
}
builder.EndTable();
}
Please let me know if you would like to know something else.
Best regards.