LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Converting User IDs to User Name

I developed this code to return the User Name. You might want to
revise it so it picks up its input from a range rather than an
INPUTBOX statement.

Regards

Greg



Sub ReturnUserNamefromID()

'This routine returns the Outlook Common Name from the known User
ID

Dim UserID As String
Dim OutObj As New Outlook.Application
Dim Mail As Object
Set Mail = OutObj.CreateItem(0)

UserID = InputBox("Enter the UserID", "Email Lookup")

Mail.To = UserID
If Mail.Recipients.ResolveAll Then
MsgBox Mail.To

Else

Debug.Print Mail.To & " did not resolve"

End If
Set Mail = Nothing

End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting data download for date 2.00707E+11 into something more user-friendly [email protected] Excel Discussion (Misc queries) 4 August 2nd 07 06:08 PM
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
How to: Make user click End User License Agreement acceptance jasonsweeney[_21_] Excel Programming 7 January 30th 04 01:41 AM


All times are GMT +1. The time now is 03:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"