Opening datasource for MailMerge

K

Kingsley

Any idea on how to use MailMerge with SQLServer wiil be appreciated. The ff
code results in error mesage that DataSource can't be opened.

object sDBConnection = "server=(local);database=Northwind;Integrated
Security=SSPI;";
object query = "select * from [Customers]";
string DSName = "C:\\Program Files\\Microsoft SQL
Server\\MSSQL\\Data\\northwnd.mdf";

WordDoc.MailMerge.OpenDataSource(DSName,ref format,ref Unknown,ref
Unknown,ref TRUE,ref Unknown, ref Unknown,ref Unknown,ref Unknown,ref
Unknown,ref Unknown,ref sDBConnection,ref query,ref Unknown,ref Unknown,ref
SubType);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top