Using of itemAdd and itemRemove events

Add-in Express™ Support Service
That's what is more important than anything else

Using of itemAdd and itemRemove events
 
Aurelien Aurelien




Posts: 84
Joined: 2008-11-14
Hello !

I'm using itemAdd and itemRemove events to process operations when a contact is added / removed from the outlook contacts.

To connect event objet to the contact folder, I use this code :

(taken from http://www.add-in-express.com/bitrix/rd.php?event1=download&event2=howtos&event3=cs&goto=/files/howtos/cs/outlookfolderitemsevents.zip)

mEventObject.ConnectTo(AddinExpress.MSO.ADXOlDefaultFolders.olFolderContacts, True)



I also tried with :

(taken from http://www.add-in-express.com/bitrix/rd.php?event1=download&event2=howtos&event3=cs&goto=/files/howtos/cs/outlookfoldersevents.zip)

ns = OutlookApp.GetNamespace("MAPI")
mEventObject.ConnectTo(ns.GetDefaultFolder(AddinExpress.MSO.ADXOlDefaultFolders.olFolderContacts), true)


But in both case, I receive events only if a contact is added/removed from the "top" folder, no events about contacts from subfolders...

How can I connect my event object to ALL contact folders ?

Thanks !
Posted 25 Nov, 2008 13:56:31 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Aurelien,

I have created a sample add-in project for you. Please check up your Inbox.

BTW Please make sure that a subfolder exists when you call the ConnectTo method.

.NET, Extended MAPI, Windows Phone & RT
Posted 26 Nov, 2008 05:29:04 Top
Aurelien Aurelien




Posts: 84
Joined: 2008-11-14
Thanks a lot !

I missed the "recursive" parameter !

Posted 26 Nov, 2008 06:18:55 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25

You are welcome, Aurelien.
.NET, Extended MAPI, Windows Phone & RT
Posted 26 Nov, 2008 06:33:34 Top