Finding the email address in Outlook.MailItem
Is there any way to find the e-mail address that an e-mail was sent to using the outlook mailitem.
Eg
VB Code:
Dim omitem As Outlook.MailItem
'blah blah code
Msgbox omitem.To
Gives me my Exchange name, rather than the actual e-mail address the message was sent to, but if I physically look in the e-mail headers I can see the e-mail address, so the info is there.
Thanks
Re: Finding the email address in Outlook.MailItem
u need to tap the recipients data...
VB Code:
Dim oMail As Outlook.MailItem
Dim oRecip As Outlook.Recipient
'...other stuff...
For Each oRecip In oMail.Recipients
Debug.Print oRecip.Address 'Not sure which one...
Debug.Print oRecip.AddressEntry
Next