问题
I want to determine to which calendar an AppointmentItem belongs.
The scenario is as follows:
An exchange administrator can have privileges to create appointments for conference rooms (by simply creating an appointment in the conference rooms calendar) and for himself (in his own calendar). How do I determine wether the item that the administrator currently looks at (inspector) is from the conference rooms calendar?
Thanks a lot!
回答1:
If this is Outlook 2007-2010, compare MAPIFolder.Store of the MAPIFolder object returned by the AppointmentItem.Parent property.
回答2:
Outlook.Folder AppointmentFolder = appointmentItem.Parent as Outlook.Folder;
Messagebox.Show(appointmentItem.FullFolderPath);
来源:https://stackoverflow.com/questions/11018485/c-sharp-outlook-addin-how-to-determine-to-which-calendar-an-appointmentitem-bel