K
Kingsley
I'm having problems opening a datasource from SQLServer 2000 to be used for a
mail merge word 2003. Each time I run the code below, I get an error message
saying "datasource can not be opened".
object oFile = System.Environment.CurrentDirectory + "\\Document.doc";
object SubType = WdMergeSubType.wdMergeSubTypeOLEDBWord;
WordDoc = WordApp.Documents.Open(ref oFile,ref Unknown,...,ref Unknown)
object sDBConnection = "server=localhost;database=Northwind;Integrated
Security=SSPI;";
object query = "Select CompanyName,Address,City,Country,ContactName from
Customers where CustomerID='ALFI'";
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);
Please help...
mail merge word 2003. Each time I run the code below, I get an error message
saying "datasource can not be opened".
object oFile = System.Environment.CurrentDirectory + "\\Document.doc";
object SubType = WdMergeSubType.wdMergeSubTypeOLEDBWord;
WordDoc = WordApp.Documents.Open(ref oFile,ref Unknown,...,ref Unknown)
object sDBConnection = "server=localhost;database=Northwind;Integrated
Security=SSPI;";
object query = "Select CompanyName,Address,City,Country,ContactName from
Customers where CustomerID='ALFI'";
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);
Please help...