Item Event Handling

  • Thread starter Thread starter Khoa Tran
  • Start date Start date
K

Khoa Tran

Dear all,

I'm writing a COM Add-in for OL 2000 to synchronize emails
between OL and IMAP server. I want to handle events for
every email item in every folder. For example, when user
moves multiple mails from this folder to another one, how
do I know what items have been moved?

Thank you very much,

Khoa Tran
 
Each MAPIFolder has an Items collection. If you declare the Items
collection WithEvents you can handle the ItemChange, ItemAdd and
ItemRemove events. ItemChange and ItemAdd return an Item object that
is the item being added or changed. ItemRemove doesn't supply the Item
and fires after it is removed so it is of minimal value.

First go to the Resources page at www.microeye.com and download the
ItemsCB COM addin sample, written in VB 6. It shows the best practices
for Outlook COM addins and also shows how to handle event handlers.
 
Back
Top