User friendly Mail Merge application using MS SQL and MS Word in ASP.Net and VB
Posted on 2009-05-24
I have a MS SQL 2005 table and a MS Word 2003 document. It's part of a project already done in ASP.Net 3.5/VB/SQL.
I've got the mail merge fields set up in the Word document to pull the appropriate fields from the SQL Server database, so I can print the whole mail merge in one shot if I want.
But, since the rest of the project is in ASP.Net and the users do not know how to use the mail merge in Word effectively I'd like to make a simple ASPX page with a DropDownList control so the user can select one record to print or perhaps a range.
I have used SQL queries in DropDownLists before, but I don't know how I would get the data to the Word mail merge that way.
There are probably multiple ways to do it, but I'm looking for "simple". I'm a novice programmer, so telling me "Create a DataSet and link it to Word" won't help me at all. I really need an example.
Say, the SQL table contains the fields [LastName] and [Address].
Thanks for any help.