How can I get selected meeting or appointment from outlook calendar view by right clicking on it with c# vsto. The only way I found of doing it, is by getting outlook folder and filter it by start and end date. The issue with this approach is that if two appointments are found in the same range there is no way of choosing which to show. Any ideas?
private void GetAppointment()
{
Outlook.Explorer expl = Application.ActiveExplorer();
Outlook.Folder folder = expl.CurrentFolder as Outlook.Folder;
Outlook.View view = expl.CurrentView as Outlook.View;
if (view.ViewType == Outlook.OlViewType.olCalendarView)
{
Outlook.CalendarView calView = view as Outlook.CalendarView;
DateTime dateStart = calView.SelectedStartTime;
DateTime dateEnd = calView.SelectedEndTime;
// Find the appointment
}
}