[英]VSTO Outlook Addin Email Sender Name
I have a VSTO Outlook 2013 addin that reads properties from CurrentItem when the read mail window is open.我有一个 VSTO Outlook 2013 插件,它在阅读邮件窗口打开时从 CurrentItem 读取属性。 When I get the property Sender I always get system.__comobject Why does it keep returning this?
当我得到属性 Sender 我总是得到 system.__comobject 为什么它一直返回这个?
Sender属性返回一个AddressEntry对象,该对象对应于从中发送 MailItem 的帐户的用户。
//if it is a regular mail or a Meeting mail
var senderName = mail.Sendername;
//if it is a task mail
var senderName = mail.Owner;
Wish can help you!愿能帮到你!
Outlook.Application oApp = new Outlook.Application(); Outlook.Application oApp = 新 Outlook.Application(); Outlook.NameSpace oApp1 = oApp.GetNamespace("MAPI");
Outlook.NameSpace oApp1 = oApp.GetNamespace("MAPI");
oApp1.CurrentUser.Name; oApp1.CurrentUser.Name;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.