How do I end my Winword process after 10 second or so

A

Alex Cheng

Hi there,

Is there a way to end a Winword process after certain time
with no response? My script will get stuck when the file is corrupted and I
don't know how to bypass the prompt. Here is my code:


Dim o As Word.Application
Set o = New Word.Application
Dim doc As Word.Document
o.DisplayAlerts = wdAlertsNone
o.Documents.Open "c:\temp\b.doc", OpenAndRepair:=True,
NoEncodingDialog:=True
o.Quit
Set o = Nothing


Thanks,

Alex
 

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