Urgent - Detecting password protected documents
Posted on 2000-01-10
I am automating Word 97 using VB6 (sequentially opening up a bunch of documents and doing stuff).
When I come across a document that has been password protected, the 'Enter Password' dialog is displayed. This stops my VB application until the user responds.
My problem is that I don't want the user to have to respond. I need a way to check if the document is password protected, and if so, simply move on to the next document.
Therefore, does anyone know of a way to check for a password before attempting to open the document, or of automatically cancelling the dialog so it doesn't stop my application.
The DisplayAlerts method doesn't do the job.
I have also posted this question to the Office section, so first-in with the correct answer from either section wins the points.