0
votes

I have a VSTO Outlook 2013 addin that reads properties from CurrentItem when the read mail window is open. When I get the property Sender I always get system.__comobject Why does it keep returning this?

3

3 Answers

1
votes

The Sender property returns an AddressEntry object that corresponds to the user of the account from which the MailItem is sent.

1
votes
//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!

1
votes

Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace oApp1 = oApp.GetNamespace("MAPI");

oApp1.CurrentUser.Name;