Automating Mailmerge In Word 2002

C

Chris Sayer

Hi

I have set-up a VB program to create a mailmerge template and subsequently
use this document to create documents over different sets of data. The
template is set up to use a DSN connection and to mailmerge with a subtype
of wdMergeSubTypeWord2000. When I open the created document I get the enter
data source dialog box if the users password has change I have looked on the
internet for a solution and it suggests coding the DisplayAlerts property
around the open of the template. I have now included this code but still
receive the enter data source dialog box. Has anyone got any
help/suggestions.

As an aside has anyone noticed that when you save a word document in 2002 it
retains the DSN connection details in the document including the User
ID/Password in the document unencrypted so anyone can view the word document
in notepad and gain a valid UserID and password. Surely this is a security
flaw on Microsoft's behave.

Thanks in advance
Chris Sayer
 
C

Cindy M -WordMVP-

Hi Chris,
I have set-up a VB program to create a mailmerge template and subsequently
use this document to create documents over different sets of data. The
template is set up to use a DSN connection and to mailmerge with a subtype
of wdMergeSubTypeWord2000. When I open the created document I get the enter
data source dialog box if the users password has change I have looked on the
internet for a solution and it suggests coding the DisplayAlerts property
around the open of the template. I have now included this code but still
receive the enter data source dialog box. Has anyone got any
help/suggestions.
I think the only thing that would work here would be to save the main merge
document without the data source attached, since you're using OpenDataSource
anyway to link in the data. If the user's password is being saved in the DSN,
then you'd need to programmatically change the DSN. Word is only prompting
because that information is incorrect. I certainly wouldn't hard-code it into
the macro, if that's what you're doing. Instead, you'd need to link up to the
data source application and request this information. For help on how to do
this, I suggest you ask in a group specific to the data source application.
As an aside has anyone noticed that when you save a word document in 2002 it
retains the DSN connection details in the document including the User
ID/Password in the document unencrypted so anyone can view the word document
in notepad and gain a valid UserID and password. Surely this is a security
flaw on Microsoft's behave.
Word mail merge was conceived and developed back in the late 1980's, before
security was such a critical issue as it is today. But saving the document
without an attached data source is certainly the way to avoid this.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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