Get Current User

  • Thread starter Thread starter E.Zenker
  • Start date Start date
E

E.Zenker

Hi,

How to read out the current user for a code used in my userdefined form.

I tried this:

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNameSpace("MAPI")
MsgBox myNameSpace.CurrentUser.Name

and this:
Set myNameSpace = Application.GetNameSpace("MAPI")
MsgBox myNameSpace.CurrentUser.NameThe response is in both cases "unkown".
What can be the reason.Or are there other ways to get the current user.User
=

Thanks
E. Zenker
 
The problem is, that Outlook does not have a current user. The name of the
user is the name entered in the default email account. Another way is to
create an element (task, appointment etc.) save it and read the sender name
propery.

Thomas Quester
www.olfolders.de
 
Back
Top