我将在会议请求 (MeetingItem / AppointmentItem) 中检查 Outlook(对于 Outlook 插件),添加收件人。我正在MeetingItem / AppointmentItem 中搜索一个事件/可能性它自己......到目前为止,我还没有找到任何事件,这添加到收件人负责。有人可以给我一个关于我应该如何进行的提示吗?
谢谢马丁
我将在会议请求 (MeetingItem / AppointmentItem) 中检查 Outlook(对于 Outlook 插件),添加收件人。我正在MeetingItem / AppointmentItem 中搜索一个事件/可能性它自己......到目前为止,我还没有找到任何事件,这添加到收件人负责。有人可以给我一个关于我应该如何进行的提示吗?
谢谢马丁
找到了解决 ItemSend 事件的方法:
readonly Outlook.Application _outlookApp = new Outlook.Application();
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
_outlookApp.ItemSend += new ApplicationEvents_11_ItemSendEventHandler(OutlookAppItemSend);
}
void OutlookAppItemSend(object item, ref bool cancel)
{
if (item is Outlook.AppointmentItem)
{
var appt = item as Outlook.AppointmentItem;
foreach (Outlook.Recipient recipient in appt.Recipients)
{
MessageBox.Show(string.Format("Rctp {0} ", recipient.Name));
}
}....
我已经弄清楚如何知道收件人是否已更改,该事件会在约会项中的任何更改时触发,但我可以使用名称进行过滤。
readonly Outlook.Application _outlookApp = new Outlook.Application();
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
_outlookApp.ItemLoad += new Outlook.ApplicationEvents_11_ItemLoadEventHandler(test_ItemLoad);
}
void test_ItemLoad(object item)
{
if (item is Outlook.AppointmentItem)
{
var appt = item as Outlook.AppointmentItem;
appt.PropertyChange += new ItemEvents_10_PropertyChangeEventHandler(appt_PropertyChange);
}
}
void appt_PropertyChange(string name)
{
MessageBox.Show(string.Format("Name: {0}", name));
xxx
}
xxx:在这里,我想现在检查一下该项目的收件人,如果它发生了变化。不幸的是,我不知道如何回到我的约会项目....