• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 645
  • Last Modified:

How do I get the default email address of the current user?

How do I get the default email address of the current user?  The user will be using Outlook 2003.
0
NevSoFly
Asked:
NevSoFly
  • 2
  • 2
1 Solution
 
ToddBeaulieuCommented:
Maybe this will help? I figured it would be more straightforward!

http://vbnet.mvps.org/index.html?code/reg/regdefemail.htm
0
 
NevSoFlyAuthor Commented:
Thanks for your reply.  There seems to be a problem in the TrimNull function.  StrPtr is not declared anywhere in the code.  But TrimNull is call in the GetRegValue function.
0
 
ToddBeaulieuCommented:
I'm not getting a good feeling about this solution, at all. Looking into StrPtr, it's a VB6 function.

I did go into my registry to the mentioned registry entry and sure enough, found my "smtp" email address. If this is what you are looking for, just ignore all this VB6 crap about reading the registry and use the .net registry framework.
0
 
NevSoFlyAuthor Commented:
that seems to have done it.  Thanks.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now