Open password protected document

T

TRM

I am trying to use VBA to open a password protected document for editing. I
have tried putting the password in the code after the open statement
(odoc.password = "password"). But, of course, this is opening the document
first, and not checking/seeing the password, so the user is still prompted.
Is there a way to do this?

Thanks!
 
T

Tony Jollans

The Open method has several password options - depending on the type of
password, simply ..

Documents.Open FileName:="C:\path\file.doc", PasswordDocument:="whatever"
 

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