Mail merge with SQL Server

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);
 
J

John McGhie [MVP - Word and Word Mac]

Kingsley:

There's nowhere near enough detail in your message for us to even begin to
answer. Full version and update levels of all software in the chain,
please.

You would be better off sending this question into the dedicated Word Mail
Merge group on this server.

Cheers

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 

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