To give along a password to a document.

L

Laurens .

Hey..

I was wondering how to give a password with the document that is reffered to.
I used the following code :

Documents.Add Template:= _
"M:\letter.dot", _
NewTemplate:=False, DocumentType:=0

But I cant seem to add a password to it.. so that I dont have to type it
when "letter.dot" opens (wich is ofcourse protected by a password)

Hope u can help me.. or at least help me along :)
 
H

Helmut Weber

Hi Laurens,

the add-method for the documents-object
doesn't support that. You have to safe the doc
with a password. Like this:

Documents.Add
ActiveDocument.SaveAs "c:\test\test-100.doc", , , "xxxxxxx"
plus later

Documents.Open "c:\test\test-100.doc", , , , "xxxxxxx"

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 

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