General discussion

Locked

Email sender's address

By georgerooker ·
I am able to read and extract data from emails in Access using VBA code like this:

Dim SubFolder As Outlook.MAPIFolder
Dim MailMsg As Outlook.MailItem

For Each MailMsg In SubFolder.Items
MailMsg.To
MailMsg.SenderName
MailMsg.Subject
MailMsg.Body

Usually the sender's email address is found in the SenderName, occasionally in the Body - and sometimes nowhere at all.

Sometimes the SenderName only returns the display name (eg. 'Ryan' not 'ryan89@abc.com'). Where is the email address? Oddly, if you print out the email it shows it, eg:
From: Ryan [ryan89@abc.com]
Sent: 26 May 2005 13:01

Can anyone help me solve this?
Thanks.

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums