Retrieving SMTP address from Outlook 2000 via VBA

B

Boy.Kamot

Hi Guys,

Is there a way of getting the SMTP address from Outlook 2000?

For example, I have a name John Doe and it will resolve that name for
me (I tried ResolveAll but a "a program is trying to access email
address" security prompt is popping up, which is unacceptable) and
give me the SMTP address and not the EX address.

I tried googling for Redemption and CDO but I'm getting nowhere. I
keep getting the "Get the address of Sender" examples and I'm having
trouble adopting the code to fetch the SMTP address of a name only.

Note that there is no existing message, just a name.

Any help would be much appreciated.

Thanks!

Boy
 
K

Ken Slovak - [MVP - Outlook]

To get the SMTP address instead of an Exchange distinguished name address
you must use something like CDO 1.21 or Redemption, the properties you need
aren't exposed to the Outlook object model in Outlook 2000.

There are lots of examples of using CDO or Redemption to get the SMTP
address, but CDO will always fire the security prompts unless the
administrative security form is used. That must be set up by an Exchange
admin.

Here's one Redemption example:
http://www.outlookcode.com/codedetail.aspx?id=1455. If you go to
www.outlookcode.com and search for "SMTP address" you'll find a lot of
examples aside from the one I pointed to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top