I need to close Modal Inspectors (launched via MS Word or other app) and replace them with non-modal Inspectors. The problem is, calling close as soon as you detect the modal inspector will cause the calling applicati开发者_运维问答on to throw a "operation failed to complete" error.
Anyone have ideas on how to suppress this error message?
it might have to do with how you're "detecting" the opening window. If you try to close it too quickly, outlook may be throwing because of that. i'd try detecting the window, then delaying for a quarter sec or so and then closing it. Let outlook have a chance to do whatever it might need to do for internal housekeeping.
精彩评论