Hi,
I've not posted here for several years, but I still remember the best experts are here on this forum. So here's my problem.
I'm working on a program that processes all docx documents in a folder. I'm opening the documents one by one.
However, some of the documents are password protected. And here my program stops working, waiting for user interaction. I would like to automatically abort the document opening, if, for example, it's not successful for 10 seconds (e.g. proper password was not supplied). I was trying to set up a form timer, with interval of 10000, that would quit then recreate the word application:Set WA = CreateObject("Word.Application") WA.Visible = True Set WD = WA.Documents.Open(FileName:=DocPath, ConfirmConversions:=False, ReadOnly:=True, NoEncodingDialog:=True)
But it never gets executed while the Word Application waits for the password.Private Sub Form_Timer() WA.Quit Set WA = CreateObject("Word.Application") WA.Visible = True End Sub
I thought maybe I could set the Word app/window to be non-modal, but I found nothing that made this possible.
Any ideas how to crack this nut?
Jimmy