Willy
Willy

Reputation: 10648

Outlook VSTO - What is the win32 hook that I need to intercept when the email subject is changed in the email list preview area?

I have an VSTO Outlook Add-in and I am on the need to detect when subject changes on the email list preview area in order to do some stuff at that point. So what win32 hook do I need to attach to?

Upvotes: 0

Views: 30

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66235

If you are interested in a particular MailItem object, use MailItem.PropertyChange event. If you want to monitor all items in a particular folder, use Items.ItemAdd/ItemChange/ItemRemove events (where Items collection is returned from Folder.Items).

You can see live events and data passed to their handlers in OutlookSpy (I am its author) - for a message, click Item button, go to the Events tab. For a folder, click Folder button, select Items property, click Browse, go to the Events tab.

Upvotes: 0

Related Questions