我正在尝试通过Outlook插件输出当前用户的电子邮件地址。我还没有能够得到任何其他的例子。我最接近的是:
emailitem.SenderEmailAddress
输出:
Smith, John
但我想:
JohnSmith@hotmail.com
任何想法?
答案 0 :(得分:0)
Dim addrEntry As Outlook.AddressEntry = Application.Session.CurrentUser.AddressEntry
If addrEntry.Type = "EX" Then
Dim currentUser As Outlook.ExchangeUser = Application.Session.CurrentUser.AddressEntry.GetExchangeUser()
If currentUser IsNot Nothing Then
MsgBox("Name: " + currentUser.Name)
End If