can I set up password at word, when I use mailmerge to print lables?

T

Tony Dong

Hi there:

I want to print the lables for envelops, so I use word to make lables and
get data from Access, and then call print word document from VB6 code,
everything working fine except it ask me the access password, does it has
some way to set up password in somewhere and it can auto print the labels
without ask the password?

Thanks

Tony
 
P

Peter Jamieson

As far as I know, if your Access database is password-protected, Word has no
mechanism to provide the password using its OpenDataSource method (which is
what Word uses to open Access). You might be able to get it to work by
starting your instance of Access directly from VB6, if there is a way to
provide the password (perhaps on a command line), then open the WOrd
document. However, I suspect that that will run into difficulties.

Your other option would be to remove the password protection and use the
"workgroup/security database" approach to Access security. You can then open
the data source using e.g. ODBC by providing the name of the "system
database" in the Connection string. But that's quite a major change and may
affect lots of other things you already have set up.
 
C

Cindy Meister -WordMVP-

Hi Tony,

Which version of Word are you working with?

What kind of password protection are you using? A password on the database,
or a user password?
I want to print the lables for envelops, so I use word to make lables and
get data from Access, and then call print word document from VB6 code,
everything working fine except it ask me the access password, does it has
some way to set up password in somewhere and it can auto print the labels
without ask the password?

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

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

Tony Dong

Hi Cindy Meister

I use Word 2000, I set up the a password on Access database

Tony
 

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