ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CurrentUser Name (https://www.excelbanter.com/excel-programming/303017-currentuser-name.html)

Bugs[_2_]

CurrentUser Name
 
Hi,

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

I have found the below procedure works for 2000 but the object mode
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 Su

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com