d henderson
Posts: 39
Joined: 2006-03-06
|
I am developing an AddIn app where I need to get ItemsEvents from 2 different folders at the same time.
In the sample as shown I get events for the Calendar folder only. If I comment out the second
itemsEvents.ConnectTo() statement, I then get events for the Contacts folder only. Could you provide a brief (VB.Net MSVS2005) example showing connecting OL ItemsEvents to 2 or more folders at the same time?
Private Sub adxOutlookEvents_ExplorerActivate(ByVal sender As Object, ByVal explorer As Object) Handles adxOutlookEvents.ExplorerActivate
Dim folder As Outlook.MAPIFolder
folder = OutlookApp.Session.GetDefaultFolder_
(Outlook.OlDefaultFolders.olFolderContacts)
If Not (folder Is Nothing) Then
itemsEvents.ConnectTo(folder, True)
End If
folder= OutlookApp.Session.GetDefaultFolder_
(Outlook.OlDefaultFolders.olFolderCalendar)
If Not (folder Is Nothing) Then
itemsEvents.ConnectTo(folder, True)
End If
End Sub
Thanks-DH |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Don.
You just need to add two (or more) the OutlookItemsEvents classes using the 'ADX Outlook Items Events Class' wizard. |
|
d henderson
Posts: 39
Joined: 2006-03-06
|
I added a second OutlookItemsEvents class and connected it up.
Things work fine now.
Thanks again Sergey! |
|