none
how to get actual full email address of recipient in ms outlook 2007

    Question

  • for each objRecipient in objMailItem.Recipients

      MsgBox objRecipient.Address

    next

    after using above code not getting actual email address of recipent , instead of showing some lengthing code containing alias name and outlook server address

    pls suggest...

    • Changed type vinodkel Friday, December 28, 2012 4:57 AM need urgent output
    • Changed type Quist ZhangModerator Monday, December 31, 2012 10:22 AM a question
    Friday, December 28, 2012 4:56 AM

Answers

  • That is an address of type EX (as opposed to SMTP).

    For Exchange recipients, use Recipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress.

    Be prepared to handle situations when any of the properties above can return a null.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, December 28, 2012 6:16 AM