Manage outgoing messages from VBA in ooutlook 2003

Hello,

I'm writing two macros that archive some ingoing message and outgoing message from outlook 2003, based on email of the sender or the destination.
For incoming messages I've no problem: I open the message from VBA and I can find the email address in: Application.ActiveInspector.CurrentItem.SenderEmailAddress
For outgoing message I use
Application.ActiveInspector.CurrentItem.To
Some time I get the email address, but some time I get a person name, i.e. 'Mark Brown' instead of mark.brown@gmail.com.
There is a way to get the email address every times? I've explored the outlook data model without finding a property telling the address.
Thanks in advance.
Angelo

AngeloGregoriAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris BottomleySoftware Quality Lead EngineerCommented:
I presume mark brown is a recipient in the exchange server?  If so then yes it can be worked around

Chris
0
David LeeCommented:
Hi, Angelo.

Issue a ResolveAll command so that all the addresses are resolved, then iterate through them using something like this

For Each olkRecipient in Item.Recipients
    varAddress = olkRecipient.Address
Next
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris BottomleySoftware Quality Lead EngineerCommented:
That's so much easier than I was thinking :o)

Chris
0
AngeloGregoriAuthor Commented:
Perfect, Thanks a lot.
0
David LeeCommented:
You're welcome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.