Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I am trying to do a mail merge using C#.NET, Word 2003 and the code from
this http://www.codeproject.com/KB/cs/C__..._Mailmerg.aspx article.................any help would be greatly appreciated! This is the error I receive, "Word was unable to open the data source." I have checked the username and password over and over and it works fine outside the below code. Any ideas why I might be getting this error? Object oConnection = "DSN=My_DSN;Uid=UserName;Pwd=Password;"; //The DSN connection name Object oQuery = "SELECT * FROM Fax_Data"; // The query to get data from the DSN Object oSubType = Word.WdMergeSubType.wdMergeSubTypeWord; //Open the data source and merge the fields wrdMailMerge.OpenDataSource("", ref oFileFormat, ref oMissing, ref oMissing, ref oTrue, ref oMissing, ref oMissing, ref oMissing, ref oFalse, ref oMissing, ref oMissing, ref oConnection, ref oQuery, ref oMissing, ref oMissing, ref oSubType); |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Another Mail Merge Problem - Word 2003 | Mailmerge | |||
Mail merge filter/sort problem in Word 2003 | Mailmerge | |||
Mail Merge date format problem with Word 2003 | New Users | |||
Mail Merge VBA problem in Word/Access 2003 | Mailmerge | |||
Word-Excel 2003 - Mail Merge Recipients problem | Mailmerge |