Item Event Handling

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

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