I am using Access VBA to import incoming emails from an Outlook 2000 inbox into an Access 2007 database.
I have used redemption to determine the email address of the sender, and this is working fine.
Now I need to determine the email address of any cc's (recipients who were carbon copied on the email).
Can someone help me out with the code needed to do this?
I'm not sure if I need to use Redemption for this like I do for the sender's email address or if I can do it using Outlook. (I can't use CDO)
I've attached the code using Redemption to get the sender's email, but I don't understand how to alter this to get the cc's.
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)
Set objSenderAE = Nothing
Set objSMail = Nothing