Trap Word Error
I'm running a Word macro from Outlook on a file that is an attachment to an email message. When Word is started, WordApp.visible is set to FALSE.
Today the routine quit working on one PC in our office. No error; it just stopped executing.
By changing WordApp.visible to TRUE, I was eventually able to discover that the code had stopped because of the following error in a dialog box that was open behind all other windows: "Document Caused a Serious Problem When It Was Opened Last Time". Once I found the message and clicked that it was OK to open the file, the rest of the code worked fine.
So here's my question: Is there a way to trap for this error in vba?
|