我正在使用 Vs2010 -> Extensibility->Shared Add-in 我已将事件处理程序添加到我的 ItemSend
applicationObject.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(applicationObject_ItemSend);
void applicationObject_ItemSend(object Item, ref bool Cancel)
{
if(Item is Outlook.MailItem)
{
Outlook.MailItem mailItem = Item as Outlook.MailItem;
if (mailItem != null)
{
MessageBox.Show("Sender's Email Address "+mailItem.SenderEmailAddress);
MessageBox.Show("Sender's Email Address "+mailItem.SentOnBehalfOfName);
MessageBox.Show("Sender's Email Address "+mailItem.SendUsingAccount);
}
}
}
mailItem.SenderEmailAddress,mailItem.SentOnBehalfOfName
mailItem.SendUsingAccount
我得到所有这些属性为空
请任何人帮助我,我想从SentOnBehalfOfName
电子邮件中获取帐户名称。