Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Dan Marth Dan Marth is offline
external usenet poster
 
Posts: 1
Default .NET/Word 2003 Mail Merge Problem

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


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Mail Merge Problem - Word 2003 [email protected] Mailmerge 9 March 19th 07 03:57 PM
Mail merge filter/sort problem in Word 2003 PenguinPaul Mailmerge 0 October 25th 05 08:46 PM
Mail Merge date format problem with Word 2003 Thang New Users 1 May 2nd 05 01:55 PM
Mail Merge VBA problem in Word/Access 2003 Virgil Mailmerge 5 February 10th 05 12:23 AM
Word-Excel 2003 - Mail Merge Recipients problem AYager Mailmerge 2 January 11th 05 04:11 AM


All times are GMT +1. The time now is 12:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"