outlook item events

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

outlook item events
...don´t fire on my own folders? 
Ronald Bouras

Posts: 32
Joined: 2006-05-20
hi everybody,

i got a problem using your outlookitemsevents sample with my own folders in outlook.

i have 2 folders of type "journal items" as subfolders in the default journal folder, called "Tax declarations" and "Invoices"
Your sample only works with the top folder (journal default folder)

since my subfolders are not default folders i tried the overload of your connecting method:

private void FormsManager_ADXBeforeFolderSwitch(
  object explorerObj, AddinExpress.OL.ADXOlFormsCollectionItem SrcItem,
  object SrcFolder, AddinExpress.OL.ADXOlFormsCollectionItem DstItem,
  object DstFolder)
   if (itemEvents != null) 
      if (itemEvents.IsConnected) itemEvents.RemoveConnection();
      itemEvents.ConnectTo(DstFolder, true);

the debugger shows that itemEvents.IsConnected is True, even on my own folders, but the event is not triggered.

every idea appreciated,

regards ron
Posted 30 May, 2006 11:56:27 Top
Fedor Shihantsov

Add-in Express team

Posts: 1188
Joined: 2005-01-11
Hello Ronald,

Does the itemEvents variable have the ItemEventsClass type?

In case of ItemEventsClass, the parameter of the ConnectTo method cannot be MAPIFolder. (DstFolder is a MAPIFolder object).
You sould get JournalItem through the Items property of DstFolder.
Posted 31 May, 2006 11:44:32 Top