danielwalters6 0 Newbie Poster

Hi all, one of my first posts, so be nice! :)

Working on a piece of AS Computing Coursework.
I'm currently developing an application in Access 2003.

The system will allow staff at our college to book IT labs, in a single central location and email the staff to confirm their booking.

I have managed to get this working for me logged in on a student account, as our internal emails have the same address as our network login.
For example

Dim EmailAddress as String
EmailAddress = (Environ("Username")) & "@ourschooldomain.com"

I have got code that talks directly to our smtp server, and sends the email...
However staff's logins are not their email addresses, their emails are
first.last@outschooldomain.com and their logins are three digit initials
However, if I put in a member of staff's login into the TO field of Outlook Web Access, click check names, it autocorrects it into their full email.

This must mean their email address & UserID are both stored within Active Directory.

Can I, using VB query the Active Directory and return the email that's associated with the current login?

I emailed the site techie, who said it was not in his job description to help, but said that by simply querying the Active directory using a LDAP connection, I should be able to find it with no problem.

I would appreciate any help you can provide, especially if you write a small explanation of what the codes/examples does.

I will not use any code within my project without mentioning the source.

Thank you in advance

Dan Walters

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.