I would like to perform a mail merge between VB.net 2005 and Word 2007 using a dataset from my application, so the user doesn't have to touch word they will just be presented with the mail merged data.
I have already created my connection to SQL server and populated the dataset but how can I output the dataset to Word. I have looked on here and can only find information relating to vb6 not the .net framework examples. I understand I will need to use Automation to achive this any documents or advice would be great.
Automation is a process that allows applications that are written in languages such as Visual Basic .NET to programmatically control other applications. Automation to Word allows you to perform actions such as creating new documents, adding text to documents, and formatting documents. With Word and other Microsoft Office applications, virtually all of the actions that you can perform manually through the user interface can also be performed programmatically by using Automation.
Word exposes this programmatic functionality through an object model. The object model is a collection of classes and methods that serve as counterparts to the logical components of Word. For example, there is an Application object, a Document object, and a Paragraph object, each of which contain the functionality of those components in Word. To access the object model from Visual Basic .NET, you can set a project reference to the type library.
This article demonstrates how to set the proper project reference to the Word type library for Visual Basic .NET and provides sample code to automate Word.
You can also search in MSDN Forums by Mail Merge key words.