SMTP from Global Address List -- thought I was there
I'm trying to use VBA to get the SMTP address out of our Exchange Server 5.5. First, looking at the properties of the AddressEntry object, I see there isn't a simple way to do this. So, I start to play with the .Address property, and I see that the parts of the SMTP address are buried in the internal address string:
/o=blah.blah/ou=blah/cn=blah blah blah/cn=UserName
At first, I thought I could parse out and concat the SMTP from this. However, there are flaws in the consistency of how this string is put together. I did a search here, and found a few threads , but the only suggestion was to use CDO. The help I found seemed to be all about using VBScript in Outlook. I want to use VBA in Access to build records for a table.
Well, I didn't know it, but some of the code I've borrowed in this effort is CDO. In the Outlook GUI, the Properties sheet for each AddressEntry in the GAL has a tab -- Email Addresses. On that tab is a listbox that shows, among other things, the SMTP address. Realizing that the Library offered by Outlook for automation does not include a full object model, I guess my question is, is the Outlook client GUI the only way to see this data?
ADSI, CDO and other Exchange directory oriented API's will allow you to look at that information (I believe).
CDOLive.com or Slipstick.com would be the 2 sites I would try (after the MS Knowledge base).
As you have found out, you are at the limit of knowledge here - so you will need to do some careful digging and searching....
You will not (unless you are very lucky with the Exchange set-up and configuration) be able to get a valid SMTP address from the \CN= format.
Well, I was lucky a few times, getting valid SMTP addresses from that string. Got my hopes up. Oh well. I'll check the sites you mentioned.
How have you been? Would you mind giving me some examples of ones that you didn't get valid addresses for. I'll take a look and see if I can give you the valid SMTP address back. If you want you can send them by PM.
Hey! Carl, not too bad, h'bout y'self?
Yes, I'd be happy to PM a bunch of Address strings to you, if you want to puzzle & parse.
I'm expecting to be working on something like this in a few weeks, and the initials tests that I've done at my work have all worked out fine. Getting some possible problem ones are just what I'm looking for.