Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2004

Tip: Looking for answers? Try searching our database.

Question re MailMerge and VB.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
thecoiman - 03 May 2004 21:41 GMT
I am trying to open a Word documents for mail merge and I keep getting
DSN log on from Word. I have created the DSN entry and works fin
outside of the application. This is the line that gives me the problem

WordDoc.MailMerge.OpenDataSource(Name:="", _
Connection:="DSN=$RMPLATINUM$", _
SQLStatement:=SQL, LinkToSource:=False
AddToRecentFiles:=False, _
SubType:=8)

Any clues??

Thank
Peter Jamieson - 04 May 2004 09:31 GMT
A few questions/points:
a. What is the actual data source? Does it require a logon? If so, and the
ODBC driver does not let you store the security info. in the DSN, you will
need to provide it in the Conection string. If you are using SQL Server and
Integrated security you /may/ need to ensure that Integrated Security is
specified in the DSN or the connection string. If you don't want to embed
security info. in the application, want good control over the application
and the user needs to log on, you should consider getting the logon details
yourself (i.e. probably in a .NET Windows form) and constructing the
connection string on-the-fly
b. can we assume you are using a machine (user/system) DSN? Otherwise, you
need the pathname of the .dsn file in Name and FILENAME=that_pathname in
Connection
c. what does the SQL string actually contain (sometimes SQL that executes
correctly outside Word does not execute from within Word, though on the
whole I've experienced this with OLEDB providers rather than ODBC drivers)
d. just in case - which version of Word?

Signature

Peter Jamieson

> I am trying to open a Word documents for mail merge and I keep getting a
> DSN log on from Word. I have created the DSN entry and works fine
[quoted text clipped - 12 lines]
> ------------------------------------------------
> ~~ Message posted from http://www.WordForums.com/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.