Bruno
Bruno

Reputation: 6449

VBA: Current Windows logged on user's exchange email address

I have a MS Access 2003 application where I need the current Windows logged on user's exchange email address.

Do I need to query Active Directory to do this or is there a simpler way? We have different domains in our organization and querying AD would be cumbersome.

Thanks, Bruno

Upvotes: 1

Views: 2954

Answers (1)

Taryn
Taryn

Reputation: 247620

You might be able to retrieve this using the Environment variables via VBA.

http://vlaurie.com/computers2/Articles/environment.htm

Environ Function code samples for VBA

For example if you know your users login to the system as '[email protected]' the Environ will give you 'FirstName.LastName', then you might be able to add your exchange email at the end.

Upvotes: 1

Related Questions