mail received/moved/deleted/created/sent event in Outlook vsto
What is the best way to detect if an email is received/moved/deleted/created/sent in Outlook?
I know of NewMail/NewMailEx on the Application and BeforeItemMove on a Folder.
NewMa开发者_开发技巧il/NewMailEx covers the mail received case but I need to handle all scenarios where something happens to a message.
BeforeItemMove is helpful but I need an application wide event, not a folder specific one. I could walk the folder tree and add event handlers for every folder but it doesn't seem right.
Any pointer?
I disagree with drventure. I have used the actions in outlook within my own application to do events. I.e. on moving an email it comes up with a dialog, with sending it does something else.
Here is a link that got me started:
http://easyvsto.wordpress.com/2010/07/27/how-to-save-mail-content-when-a-mail-is-sent-from-outlook/
Further to the send action in the link above, there is a move action as well.
I don't believe there is such an event. What I've done in the past is monitor the app object for when the "active" folder changes. In that event, I connect up to whatever the active folder is and start monitoring IT for changes to it's contained email items, under the notion that for a user to do anything to the items in a folder, that have to first have navigated to that folder.
精彩评论