Re: Prevent user interection in unattended code process
- From: "Jonathan West" <jwest@xxxxxxxx>
- Date: Thu, 13 Mar 2008 15:44:08 -0000
"ODI" <ODI@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:AEF98468-0971-4786-91FD-03A1A0ABBE72@xxxxxxxxxxxxxxxx
I try to scan documents to find out corrupt ones from earlier versions. My
code runs unattended. But i get the Password-Dialog to open the protected
files (not content protection but file protection), this stops my code and
waits user
interaction. In such a case i don't even need to open the document, instesd
would close it and log it as protected. With which API can I get the handle
of the PW-Dialog and send it the command to cancel it? Or is there any other
method to get rid of this Dialog-Window?
My code runs under Word 2003 - VBA
I used Application.DisplayAlerts = wdAlertsNone which should prevent this
PW-Dialog from appearing but it doesn't work!!! It must be a bug or the
PW-Dialog doesn't count as an alert...
HasPassword-Property works after opening the document, which doesn't help
either, because i can't open it without entering the password.
I'll be happy about any helping idea..
Thanks
Skipping Password-Protected Documents in a Batch Process
http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
.
- Prev by Date: Office XP VBA templates & MOSS 2007
- Next by Date: Re: MS Word Drawing Buttons via VBA
- Previous by thread: Office XP VBA templates & MOSS 2007
- Next by thread: How best to distribute Excel 2003 spread*** with VBA Macros?
- Index(es):