I want to write an add-in for Outlook 2010. The idea is - user selects one mail item in folder, then presses the button on ribbon which starts the add-in. Add-in gets information from selected item, process it and displays result. I run in to problems when trying to get the Inspector of selected item. I tried:
Outlook.Inspector Point = this.Application.ActiveInspector().CurrentItem as Outlook.Inspector;
Outlook.MailItem mailItem = Point.CurrentItem as Outlook.MailItem;
Of course this doesn't check if current item is actually an mail item but that's for later. My problem is, when i try running the program i get NullReferenceException. The only working examples of this I found on web was with event handling. But I want to start add-in on button press..
I am trying to make this in .NET 3.5 not 4