How to determine if an object is the active inspector?

J

John Riddle

Hello,

I've got a lot of code in my contact form that processes it based on certain
events (property changes, write, etc.). Anyway, I've also got code in my VBA
module that processes items. What I want to do is NOT run the code behind
the form if the form is not actually open (such as a write event on the item
when the item is not open, I don't what the Item_write() event to fire.

How can I wrap the code in the Item_Write() event so that if the item is not
open and the active inspector for Outlook, don't exectute any code? I'm
guessing that I'd use ActiveInspector, but have run into problems trying to
use this so far. Does anyone have a small code sample that tests if an item
is open?

Thanks,

John
 

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