i have this "simple" Outlook-Object:
Outlook.Explorer olExplorer = this.Application.ActiveExplorer();
in "ThisAddin_StartUp" i register the olExplorer.FolderSwitch event to a function olExplorer_FolderSwitch(). There i must create an Outlook-Folder Object from the current Folder:
Outlook.Folder f = olExplorer.CurrentFolder as Outlook.Folder;
But: the property "CurrentFolder" is of type MAPIFolder and cant be used as Outlook.Folder. How can i "cast" the CurrentFolder-Property to an Outlook.Folder? - without loosing the event-handler? If i do this simple conversion, the object f will not fire the event BeforeItemMove - because f is NULL where olExplorer.CurrentFolder is not