How can I skip PW protected documents to open in an unattended cod

O

ODI

I try to scan documents to find out corrupt ones from earlier versions. My
code runs unattended. But i get the PW-Dialog for the protected docs, this
stops my code and waits user interaction. How can i prevent this?

My code runs under Word 2003 - VBA
I used Application.DisplayAlerts = wdAlertsNone
it doesn't work!!!

HasPassword-Property works after opening the document, which doesn't help
either, because i can't open it without entering the password.

Can anyone help me???
Cindy are you there?? - I'm Didem from SwissNationalBank... Hope you're
doing well and can help me!
 
J

Jay Freedman

I try to scan documents to find out corrupt ones from earlier versions. My
code runs unattended. But i get the PW-Dialog for the protected docs, this
stops my code and waits user interaction. How can i prevent this?

My code runs under Word 2003 - VBA
I used Application.DisplayAlerts = wdAlertsNone
it doesn't work!!!

HasPassword-Property works after opening the document, which doesn't help
either, because i can't open it without entering the password.

Can anyone help me???
Cindy are you there?? - I'm Didem from SwissNationalBank... Hope you're
doing well and can help me!

Here's some help:
http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm
 
O

ODI

Thanks Jay,

But the problem that I have is not with pw-protected content but with the
file protection! That's why I tried to use .HasPassword Property which
doesn't help...

The problem is, I have to prevent this PW-Dialog from appearing, which
should be done with Application.DisplayAlerts = wdAlertsNone but it's not
working. It must be a bug or the PW-Dialog counts as an alert...
 

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