Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, everyone

We can get the current user name by the following code:

VB
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.
Posted
Updated 3-Apr-15 9:37am
v3
Comments
RedDk 25-Mar-15 13:37pm    
Specific user from address list?

NS.Accounts.Item(1)

Count being "1" ... or For/Next through Item(n) if Count > 1
Member 11526934 3-Apr-15 15:40pm    
Sorry because i forget to mention global address list, so i have already edited the title. If there is no answer then i will change it back to the original title and pickup your answer. Thank you for your help.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900