C# Outlook AddIn: How to determine to which calendar an AppointmentItem belongs?

别说谁变了你拦得住时间么 提交于 2020-01-05 13:00:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!