Results 1 to 4 of 4

Thread: retrieving email address from global address book

  1. #1

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    retrieving email address from global address book

    I use CDO to open the outlook addressbook.
    After the user selects an address entrie, I want to get the name, and the email address of the selected entry.
    The name is no problem, but the address property of the addressentrie shows the exchange server address, while I want to get the SMTP address (someone@somewhere.com)

    Does somebody know how to get this?
    If it is possible to display the addressbook dialog with a different method than using CDO then thats fine too.

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    You can use mapi or i saw some good examples in a cdo book by wrox. Download the code from their site. www.wrox.com and do a search on CDO. Then just download the code from their.

  3. #3

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Unfortunately this didn't help much.
    I downloaded their code for Professional CDO programming, and this really sucked. (Sorry for my language)

    To start with, the code assumed that the user knows the profile name. I have never met a user who knows his profile name.
    This is a general problem in CDO or Mapi. If somebody knows a way to retrieve the default profile, I would like to know this.

    The second problem was that it throws a GPF when logging off.
    This also isn't a big problem, I could fix that.

    The real problem is that is doesn't do what I want.
    It shows the default address, and for address entries for the global address book (using an exchange server), it will be an exchange address.
    I don't remember the details but it looks like this:
    /o=someorganisation/ou=someorganisationunit/cn=something etc.
    While I want to retrieve the SMTP address (someone@somewhere.com)

    So I'm back to square one.
    Mapi doesn't offer this information at all. Even if I could retrieve all addressentries from the global address book in code (that will be several thousands) I don't think I can get a reasonable performance. That is why I wanted to use the standard dialog box.

    If you open the property window of the address entry with outlook, it shows 4 addresses in the email tab. I want to retrieve the SMTP addres (I believe it is the third one).

    I'm open for any suggestion.

  4. #4
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    There is an option to not use the dialog. The reason i know this is cause i wrote a component at work to pull the phone directory from the Public folders info store. Yeah i know you are going to say why not use the webmail for outlook. Well outlook does not support that feature. So here is what i did. I have a task that runs every night and uses the anon account to log on to the exchange server. It downloads the infostore: Public Folders. Just so it is not that big. Then i parse through the objects and collect all of the phone numbers and create an HTML page with them. Then it is linked from the webmail outlook. If you have an ANON account you can do that you do not need to use the profile. Just set it to false.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width