Password for a Word doc

P

pvp

I am in Access XP and I create a Word doc.
I want to set passwords for this document so that it is
protected from prying eye...
BUT I would like those passwords to apply when someone
opens the document directly (from the desktop) and not
when it is opened from within Access

Many thanks.
 
M

Malcolm Smith

If the password is predefined (perhaps it's in the database) then possibly
you could consider:

set oDoc = oWord.Documents.Open ("plugh.doc",,,,"xyzzy")

May I ask why you want this requirement?

- Malc
www.dragondrop.com
 
P

pvp

Thank you, you have answered one of my questions - how to
open a Word doc with a password from Access.

What I need to know also is how I can specify this
document's passwords (read and write) from Access in VB.

The reason for all this is that I have a d/b associated
with Word docs and the d/b is encrypted and password-
protected but at present the Word docs are not - which is
not very clever... And the user will want to look at the
Word doc indpendently of the database that created it.

I look forward to your comments.
 
M

Malcolm Smith

Why don't you hold the document's password in the database?

In fact, let's step back a little. What is the whole point of this
exercise?

- Malc
 
Top