I know this question has been sort of asked, but I have a specific issue which I haven't found the answer for. I am trying to open a shared calendar from another user and his/her calendar is NOT their default calendar.
I have tried the following:
var ns = Globals.ThisAddIn.Application.Session;
var recip = ns.CreateRecipient("me@me.com");
if (recip.Resolve())
{
var sharedCal = ns.GetSharedDefaultFolder(recip, Outlook.OlDefaultFolders.olFolderCalendar);
}
This just does not work.
I can see the shared calendar by doing the following
private void GetCalendars()
{
Outlook.CalendarModule calModule = (Outlook.CalendarModule)this.Application.ActiveExplorer().NavigationPane.Modules.GetNavigationModule(Outlook.OlNavigationModuleType.olModuleCalendar);
foreach (Outlook.NavigationGroup group in calModule.NavigationGroups)
{
Debug.WriteLine("Calandar Folders Group >>>>" + group.Name);
foreach (Outlook.NavigationFolder folder in group.NavigationFolders)
{
Debug.WriteLine("Calandar Folders: >>>>" + folder.DisplayName);
}
}
}
I just don't know how to open the calendar once I have the name. There is no way to get the ID using the steps above
In outlook, the calendar exists in the "Shared Calendars" navigation tree.
I am looking for a way to get the names of the Shared Calendars and then having the user select the shared calendar (E.g. From a dropdown box) and then opening that calendar.
I have found code on how to do everything else but not that specifically!
Can someone point me in the right direction??
Thanks!!