|
-
Apr 14th, 2008, 11:42 AM
#1
Thread Starter
Hyperactive Member
close Password dialog, get next file
Hello,
My problem all stems from trying to skip a Word or Excel document when it is password protected. I'm using a late-bound VB6 exe to access the Office docs.
When Excel 2002 hits the Open statement of an Excel 2007 password protected workbook, it ignores the "Password:=" argument I pass it, and displays the Password dialog instead (this does not happen in older versions of XL).
To correct this, I wrote a separate, stand alone, small VB6 app which just continually sends the ESCAPE character. This sucessfully removes the Password dialog, I capture the error message, skip the file, and go on to the next file.
In Word 2002, I have a test document that does some sort of downloading to a remote server when it is Opened. This of course ties up Word and I've just discovered that the series of ESCAPE characters sent by the separate app causes the "application is busy, Switch To/Retry" dialog to appear.
All I want is a smoothe app, without any dialogs or pop-ups. (it seems impossible) This brings me to the heart of the problem:
Is there any way to capture the Password dialog box and close it without sending ESCAPE characters?
Or how do I unlink Word docs so it doesn't download anything? (at least excel lets you do it in the Open statement "UpdateLinks:=0" ), but Word??
BTW, if it matters, Excel & Word are hidden instances.
Also, they do not want the users to have to interact with the dialog boxes. My app should handle it.
Thanks in advance
added in Edit: I've been reading around - Can multi-threading and use of OleRequestPendingTimeout be used as a solution?
Last edited by CyberJar; Apr 14th, 2008 at 12:24 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|