Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Nottingham, Nottinghamshire, England
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is it possible to get a PC Users Full Name (Access 97/NT4)

    I know it's possible to get a users Login Name from an API call, but I need to get the users Full Name. The reason for this is that I have an application that sends emails and in a development mode I want the application to send emails to the developer, over-riding the recipient that would typically be used in production. Now I know I could rely on the developer to change the email settings, but (and I include myself here) the developers are very forgetful...

  2. #2
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is it possible to get a PC Users Full Name (Access 97/NT4)

    Perhaps you can find the users full name in the registry somewhere without using the standard 'GetUserName' API. I had a quick search through mine and found it in my MS Exchange settings under the following key...

    HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfilesMS Exchange Settings13dbb0c8aa05101a9bb000aa002fc45a

    Depends on your mail client whether you would have this key, but if so you could use the RegOpenKeyEx & QueryValueEx to extract the users full name. Try searching your registry to see if you can find 'Joe Bloggs' held anywhere...

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Nottingham, Nottinghamshire, England
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is it possible to get a PC Users Full Name (Access 97/NT4)

    It's ok, I found that the MailItem object exposes the users email address if you dig deep enough
    i.e.
    MailItem.Session.CurrentUser.AddressEntry
    (It would have helped if I'd mentioned that we use outlook 98 as the mail client)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •