Redemption and SenderName vs. Sender Address

M

Michael Hyatt

I picked up this code on OutlookCode.com:

Function R_GetSenderAddress(objMsg)
Dim strType
Dim objSenderAE ' Redemption.AddressEntry
Dim objSMail ' Redemption.SafeMailItem
Const PR_SENDER_ADDRTYPE = &HC1E001E
Const PR_EMAIL = &H39FE001E

Set objSMail = CreateObject("Redemption.SafeMailItem")
objSMail.Item = objMsg
strType = objSMail.Fields(PR_SENDER_ADDRTYPE)
Set objSenderAE = objSMail.Sender
If Not objSenderAE Is Nothing Then
If strType = "SMTP" Then
R_GetSenderAddress = objSenderAE.Address
ElseIf strType = "EX" Then
R_GetSenderAddress = objSenderAE.Fields(PR_EMAIL)
End If
End If

Set objSenderAE = Nothing
Set objSMail = Nothing
End Function

How can I modify it to get the Sender's name rather than address. (Sorry to
be so dense!)
 
K

Ken Slovak - [MVP - Outlook]

Use the Object Browser when you want to know what properties, methods and
events are available for an object. For a Redemption SafeMailItem use
objSMail.SenderName.
 

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

Top