I have an Outlook add-in, which is a new Ribbon tab that connects to my server database so that some user data is associated with an Outlook object.
This feed tab is currently displayed in the Mail Item.
I am expanding it to show in the Tasks and Calendar items (Appointment, Meeting, etc.).
Currently, the way to define a newly created item is as follows →
Microsoft.Office.Interop.Outlook.Application interopApplication = ThisAddIn.Application.Application if (interopApplication.ActiveExplorer().CurrentFolder.DefaultItemType.ToString() != "olTaskItem") { .... }
Thus, I can identify the folder and the new item associated with it (for example, in the Inbox, Create a new mail item, I create a new appointment in the calendar, etc.)
Now that I am in my inbox and I click New Destination, it identifies the new item created as olMailItem , not olAppointmentItem . The same thing happens when I am in the Calendar window and I click on the "New mail item".
My question is: how to identify a new item created regardless of which folder I am in?
Sunil source share