Outlook object

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

I am using the Outlook.MailItem object to extract fields such as
ReceivedBy, SenderName and Subject from emails, but it seems like there
is no way to get at the actual received by email address and sent by
email address, I can only get at the actual name of the sender and
recipient.

Is there any other way to get these email addresses?
 
I am using the Outlook.MailItem object to extract fields such as
ReceivedBy, SenderName and Subject from emails, but it seems like there
is no way to get at the actual received by email address and sent by
email address, I can only get at the actual name of the sender and
recipient.

Is there any other way to get these email addresses?

Did you look at the Recipients collection on MailItem, as well as
SenderEmailAddress?
 
I can't find SenderEmailAddress in intellisense for this object...are
you sure you can get this?
 
SenderEmailAddress is only available in Outlook 11...is there anything
similar I can use in Outlook 10?
 
I have found this code in VB to get the ReplyTo address. Can anybody
tell me how to declare the Reply object?

Set objReply = objMsg.Reply
On Error Resume Next
Set objRecip = objReply.Recipients.Item(1)
If Err = 0 Then
' address will be in Name or Address depending
' on sending application and type of address
strAddress = objRecip.Address
If strAddress = "" Then
strAddress = objRecip.Name
End If
ElseIf Err = 287 Then
'handle possible security patch error
strAddress = ""
MsgBox "The Outlook E-mail Security Patch is " & _
"apparently installed on this machine. " & _
"You must response Yes to the prompt about " & _
"accessing e-mail addresses if you want to " & _
"get the Reply To address.", vbExclamation, _
"GetReplyToAddress"
End If
 
It looks like it's the reply to an Outlook mail item, which would be another
mail item, so try Outlook.mailItem if you've included the Outlook reference.
If that doesn't work you can dim as Object.
Paul Shapiro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Email Bounce Error 3
itemsend 0
threading 10
Outlook Macro - Help Required 0
Best Email & Web hosting 5
Outlook events stop work randomly 0
Outlook Creating an Outlook form 2
Changing "From" Email address based upon "To" 0

Back
Top