import outlook fullname object to spreadsheet

  • I am trying to write a program for my office where the users full name is taken from the Global Address List (GAL) of outlook, and entered into a specific cell (Currently B3).

    I have tried calling the fullname object for the outlook.contactitem property, but with no luck.

    The users name is to correlate to their user ID number (which they use to log onto the system). I can make this appear in a cell already, but I need the program to find this number in the GAL, and display the relative full name of the user.

    Also, I need it to show, for example, "Simon Caddy" rather than "Caddy, Simon".

    Any help would be greatly appreciated.

  • Do you know the OL Contact Item field into which the ID is placed - if it is at all?

    As far as OL goes the normal way to extract the nt id of the user is to look at the Address field - the id is normally at the end (.../cn=lw) where cn is NORMALLY the nt.

    If you do then the simplest solution would be to iterate (via a loop) through each ol.contactitem and test whether the cn=x = environ("username")

    if it is then pull the OL contact item name and place it into B3.

    The alternative may be to query your mail exchange directly (not use OL at all) - I have some code for this but your IT dept should be able to give you something to do this that is specific to your exchange server.

    Let us know what you want to do and we can post up some code.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!