PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming delete item, move to next item event

Reply

delete item, move to next item event

 
Thread Tools Rate Thread
Old 26-04-2004, 11:23 PM   #1
Joanne
Guest
 
Posts: n/a
Default delete item, move to next item event


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
  Reply With Quote
Old 27-04-2004, 02:31 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: delete item, move to next item event

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Joanne" <jlcng0703@jambotech.com> wrote in message
news:f7e52ef0.0404261423.b56c2c0@posting.google.com...
> 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



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off