Firstly, instead of reading the To property, you need to loop through the
Recipients collection.
Secondly, ff you were using Outlook 2007, you could read the
Recipient.AddressEntry.GetExchangeUser.PrimarySMTPAddress property.
In older versions of Outlook your only choice is either Extended MAPI (C++
or Delphi) or <plug> Redemption (url below) which exposes
AddressEntry.SmtpAddress property</plug>
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"VictorL" <VictorL.DeleteThis@discussions.microsoft.com> wrote in message
news:F2E4A93F-B274-45C0-AFA2-61F4F0860FDD@microsoft.com...
> 'Hello,
>
> I'm writing script for Outlook 2003 that has to check recipients SMTP
> address. Most recipients are in the Exchange's GAL.
>
> To: string looks like this: To: John, Doe; Jane, Brown
>
> I need to get Recipient's primary SMTP address from address book, and if
> this is possible other e-mail addresses as well.
> What I expect to receive: "John, Doe's address is jdoe.DeleteThis@company.com"
>
>
> Thank you,
> Victor
>
>
>