Created
April 5, 2016 09:34
-
-
Save bjoerntx/a80c1cb168ed72822ed01bff65439ed7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DataTable dt = new DataTable(); | |
dt.Columns.Add("company"); | |
dt.Columns.Add("name"); | |
dt.Rows.Add(new string[] { "Text Control", "Peter Jackson" }); | |
dt.Rows.Add(new string[] { "Microsoft", "Sue Williamson" }); | |
dt.Rows.Add(new string[] { "Google", "Peter Gustavsson" }); | |
mailMerge1.LoadTemplate(Server.MapPath("template.docx"), | |
TXTextControl.DocumentServer.FileFormat.WordprocessingML); | |
mailMerge1.DataRowMerged += mailMerge1_DataRowMerged; | |
mailMerge1.Merge(dt, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment