We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Mail Merge

Thread ID:





115969 Mar 7,2014 02:03 PM UTC Mar 12,2014 02:59 PM UTC ASP.NET Web Forms (Classic) 1
Tags: DocIO
Kjell Ek
Asked On March 7, 2014 02:03 PM UTC

I'm no expert on this, and need some correction :-)

I'm trying to rewrite the example Employee Report Sample to talk to my sql server database and open the result as Sample.doc.
Accompany Demo.doc as I try to print to.
But get it unfortunately will not work. Help on the way would be appreciated as I suspect I have done something wrong, either in code or in demo.doc file.
Sample.doc opened, but no data, looks exactly demo.doc


Dim table As New DataTable()

Dim MyConnection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings.Get("xxxxxx"))

Dim SelectCommand As String = "Select TOP(5) fornamn, efternamn from medlem"

Dim MyDataAdapter As New SqlDataAdapter(SelectCommand, MyConnection)





dataPath = Server.MapPath("~/test/Demo.doc")

Dim document As New WordDocument()

document.Open(dataPath, FormatType.Doc)

table.TableName = "medlem"


document.Save("Sample.doc", FormatType.Doc, Response, HttpContentDisposition.Attachment)

End Sub

Attachment: Demo_c41b718a.zip

Sathish K [Syncfusion]
Replied On March 12, 2014 02:59 PM UTC

Hi Kjell,


Thank you for your interest in Syncfusion products.


We have prepared a sample to show how perform mail merge with the Sql server database data. Please refer that and apply the same in your sample. If you still facing the same problem, kindly update us your sample along with the template document. Thereby we will analyse further on the mentioned problem and provide you appropriate solution.


Please let us know if you have any other questions.




Attachment: Sample_e00a1883.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon