2011-03-14 65 views
0

我將在Outlook(對於Outlook Addin)中,在會議請求(MeetingItem/AppointmentItem)中檢查收件人的添加時間。 我正在尋找一個事件/可能性在它自己的MeetingItem/AppointmentItem ... 到目前爲止我還沒有發現任何事件,哪些添加到收件人是負責任的。 有人可以給我一個關於我應該如何繼續的提示嗎?搜索Outlook 2010會議請求事件c#

謝謝 馬丁

回答

1

發現在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)); 
      } 

     }.... 
0

我已經想通了,我怎麼知道,如果收件人已被更改,就在appointmentItem任何更改,事件觸發,但我能與名稱進行篩選。

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:在這裏,我只想現在通過該項目的收件人,如果它已經改變。不幸的是,我不知道該如何找回我的約會項目....