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.
Unfortunately, activation email could not send to your email. Please try again.

Mail Merge

Thread ID:

Created:

Updated:

Platform:

Replies:

115969 Mar 7,2014 09:03 AM Mar 12,2014 10:59 AM ASP.NET Web Forms (Classic) 1
loading
Tags: DocIO
Kjell Ek
Asked On March 7, 2014 09:03 AM

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)

 

MyDataAdapter.Fill(table)

MyDataAdapter.Dispose()

MyConnection.Close()

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

Dim document As New WordDocument()

document.Open(dataPath, FormatType.Doc)

table.TableName = "medlem"

document.MailMerge.ExecuteGroup(table)

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

End Sub



Attachment: Demo_c41b718a.zip

Sathish K [Syncfusion]
Replied On March 12, 2014 10:59 AM

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.

 

Regards,

Sathish


Attachment: Sample_e00a1883.zip

CONFIRMATION

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.

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.

;