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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top