View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bugs Bugs is offline
external usenet poster
 
Posts: 3
Default CurrentUser Name

Hi,

I need to write a procedure to find the users email address under both 97 and 2000.

I have found the below procedure works for 2000 but the object model doesn't support it under 97.

Any ideas would be greatly appreciated...

Sub GetName()
Dim test As String, olApp As Object

Set olApp = CreateObject("Outlook.Application")
test = olApp.Session.CurrentUser.Name
MsgBox test

End Sub