Thread: BCM 2007 events
View Single Post
  #5  
Old December 11th 06, 10:18 AM posted to microsoft.public.outlook.program_addins
Aidal
external usenet poster
 
Posts: 9
Default BCM 2007 events

Sue Mosher [MVP-Outlook] skrev:
1) Do somthing when ever a ContactItem (or Account) is created.


Subscribe to the MAPIFolder.Items.ItemAdd event for the desired folder(s). The sample at http://www.outlookcode.com/codedetail.aspx?id=456 is for the Sent Items folder, but it can supplement the information on that event in Help.

2) Do somthing when ever a ContactItem (or Account) is edited.


MAPIFolder.Items.ItemChange event. Another sample to supplement what's in Help: http://www.outlookcode.com/codedetail.aspx?id=566

3) Do somthing when ever a ContactItem (or Account) is deleted.


There's no surefire way to catch that until Outlook 2007. ContactItem.BeforeDelete fires only if the user has the item open and MAPIFolder.Items.ItemRemove doesn't return the item that was removed. One approach is to maintain your own list of what items are in each folder and check it against the actual folder contents whenever ItemRemove fires.

Thanks for your reply Sue.

I will try this out right away.

By the way, about the "deleted" event, it is infact Outlook + BCM 2007
I'm developing for.


/Aidal
Ads