Outlook VBA:从全局地址列表中获取特定用户名或电子邮件 [英] Outlook VBA: Get specific user name or email from global address list
本文介绍了Outlook VBA:从全局地址列表中获取特定用户名或电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好。
我们可以通过以下代码获取当前用户名:
Dim NS As Outlook。 NameSpace
设置 NS = Application.GetNamespace( MAPI)
MsgBox NS.CurrentUser
这将显示使用工作站的当前用户的名称,但是如果我想从全球地址列表中获取特定用户呢?
例如我想输入用户的电子邮件地址来获取他的名字,或者我想输入他的名字来获取他的电子邮件。反正有吗?
非常感谢您的帮助,谢谢您的时间。
问候。
解决方案
看看这里:从Outlook全局地址列表中提取电子邮件数据 - GAL [ ^ ]
Hi, everyone
We can get the current user name by the following code:
Dim NS As Outlook.NameSpace
Set NS = Application.GetNamespace("MAPI")
MsgBox NS.CurrentUser
This will show the name of the current user who is using the workstation, but what about if i want to get a specific user from global address list?
for example i want to enter a user email address to get his name, or i want to enter his name to get his email. Is there anyway to do that?
Your help is greatly appreciated, thank you for your time.
Regards.
解决方案
Have a look here: Extract Email Data From Outlook Global Address List - GAL[^]
这篇关于Outlook VBA:从全局地址列表中获取特定用户名或电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文