Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get From Email Address for Outlook from Access VBA

Status
Not open for further replies.

jdwuk2003

Technical User
Aug 7, 2003
4
GB
Hi,

Upon opening an Access 97 database I retrieve the Win NT username and store it in a table so I know who is using the database.

Is there anyway to retrieve the users email address from outlook?

I've looked through loads of threads about outlook and access vba stuff, but nothing helps as it's all about sending emails which I can already do.

Can anyone help!! Cheers - J.
 
Well, that depends on your company's Outlook set-up. You could try attaching your Outlook Address Book as an attached table in your database (File, Get External Data, Link Tables, Files of Type: Exchange(), Link). Then, if one of the fields in the Address corresponds to the user's NT username (where I work the Address Book's Alias field matches the NT account) you could run a query on the attached table, using that matching field as a parameter, to return the e-mail address.

If you've got a big Address Book you might find this takes a couple of seconds, but it should work.

Hope this is of some use.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top