Outlook resolve user name and report user's distribution groups
Looks up user in local tables and resolves to email address or #err Other function looks up user and resolved user's distribution groups in Outlook. Attribute VB_Name = "Outlook_resolve_name" Option Explicit Function ResolveDisplayNameToSMTP ( Name As String ) As String Dim oRecip As outlook.Recipient Dim oEU As outlook.ExchangeUser Dim oEDL As outlook.ExchangeDistributionList Dim z Set oRecip = outlook.Session.CreateRecipient ( Name ) oRecip.Resolve ''try first space last name If Not oRecip.Resolved And InStr ( 1 , Name , "," , vbTextCompare ) > 0 Then z = Replace ( Name , "(" , "," , 1 , - 1 , vbTextCompare ) z = Replace ( z , ")" , "," , 1 , - 1 , vbTextCompare ) z = Split ( z , "," ) Set oRecip = outlook.Session.CreateRecipient ( z ( 1