outlook vba:获取运行脚本的用户的经理

时间:2017-10-11 11:28:05

标签: vba excel-vba excel

Herealso here描述了如何从Outlook联系人获取Manager。但是:我想获取运行脚本的用户的名称和管理器。我怎么能这样做?
THX

1 个答案:

答案 0 :(得分:0)

这比我想象的要容易 当然,您应该添加Null的检查,但功能是:

Set appOL = New Outlook.Application
MsgBox appOL.Session.CurrentUser.AddressEntry.GetExchangeUser.Manager