delete item, move to next item event

J

Joanne

I've written an Outlook COM addin that intercepts Inspector events
such as read(), close(), open() based on the MicroEye example.

Under the Outlook "Tools" menu->"Options" item->"Preferences"
tab->"Email Options" button, there is a drop down menu to specify
message handling options. I've specified the option: "After moving or
deleting an open item: open the next item". But I've found that if I
have an open mail item and delete it, while the next email item is
displayed as expected, I never get a mailitem open() or read() event
for this item. I've been able to successfully capture the read()
events when a user selects the Next/Previous item buttons -- which
results in the same inspector being reused, but in the case where I
delete an item in the current inspector window, the next item that is
displayed in the same window never seems to generate a read() or
open() event. My addin is designed to do some processing on whenever
an open() or read() event is fired -- but there is no such event when
the message handling option is set to "open the next" or "open the
previous" items upon delete/move.

Can anyone confirm this observation?

Thanks.
J
 
K

Ken Slovak - [MVP - Outlook]

Depending on which Outlook version is being used and which patch level it's
at you may or may not get a NewInspector event when Next/Previous is used.

Are you using an Inspector wrapper like the Explorer wrapper in ItemsCB? If
you are declare a MailItem WithEvents inside that wrapper class and handle
not only the Inspector events but also the mail item events. See if the
Inspector.Activate and Deactivate events help, although they will fire
multiple times in different orders depending on Outlook version and whether
the item has previously been opened in that Inspector and if Next or
Previous was used.
 

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