
Extracting email address from "From:" field
Hello there,
There is a way to get the e-mail address, I found the only way is to fake a reply
message and grab the e-mail address:
Set onReply(is a mailitem) As onNewmail(the current message).Relpy
Set FakeRepy(mailItem) = onReply
Set Recip(recipients) = Fakereply.recipients
Set CurrRecip(recipient) = Recip.Item(1)
Address(string) = CurrRecip.Address
Address will hold the address of the sender and the reply message created is
ignored.
I have a qestion you may be able to help with, I can't get the SaveAs to save my
messages in HTML format, or any format for that matter. here is sample of what I
am trying to do
NewMail.SaveAs "M:\Apprpriate Folder\" & NewMail.SenderName & " " &
NewMail.Subject, olHTML
Quote:
-----Original Message-----
Hi,
I'm new to this group so I hope this question is appropriate here. I am trying
to extract the fully qualified email address from the 'From' field in Outlook.
However as in Outlook 2000 if the mail is sent with an alias eg Joe Smith, this
appears in the 'From' field. What I want to retrieve is the actual address
I have tried using the following code:
If mItem.Class = olMail Then
mFrom = mItem.SenderName
....
This only works if the Send Name is the fully qualified address.
Please Help!!
Kevin
.