In Outlook 2013 in Calendar view, when an AppointmentItem is selected, I need to be able to determine if that item is on the current user's Calendar, or if they have selected an item from someone else's shared calendar. So if John Doe is the current user, I need to check if the selected appointment is on John's calendar, or on someone else's. (I need to disable a button on my ribbon if they have selected an item on someone else's calendar) How do I check this?
1 Answers
1
votes
The key is to get a Folder object from Explorer.CurrentFolder via Application.ActiveExplorer. Shared folders will have the Folder.EntryID value duplicated in Folder.FolderPath, while non-shared folders will have an actual folder path value.
You can also use NameSpace.GetSharedDefault if you want to get a proper reference to a shared folder.