Use the Recipients property to get the CC recipients. The property returns a Recipients
collection that represents all the recipients for the Outlook item. To find the CC recipients you can check the Type
property of the Recipient
class in the following way:
myRecipient.Type = olCC
After you have got the CC recipient object you could check the Recipient.Address property which returns a string representing the email address of the Recipient
.
Also you may check the Recipient.AddressEntry property which returns the AddressEntry
object corresponding to the resolved recipient. So, you will be able to distinguish Exchange users and etc. For example:
Sub DemoAE()
Dim colAL As Outlook.AddressLists
Dim oAL As Outlook.AddressList
Dim colAE As Outlook.AddressEntries
Dim oAE As Outlook.AddressEntry
Dim oExUser As Outlook.ExchangeUser
Set colAL = Application.Session.AddressLists
For Each oAL In colAL
'Address list is an Exchange Global Address List
If oAL.AddressListType = olExchangeGlobalAddressList Then
Set colAE = oAL.AddressEntries
For Each oAE In colAE
If oAE.AddressEntryUserType = olExchangeUserAddressEntry Then
Set oExUser = oAE.GetExchangeUser
Debug.Print(oExUser.JobTitle)
Debug.Print(oExUser.OfficeLocation)
Debug.Print(oExUser.BusinessTelephoneNumber)
End If
Next
End If
Next
End Sub
The AddressEntry.GetExchangeUser method returns an ExchangeUser
object that represents the AddressEntry
if the AddressEntry
belongs to an Exchange AddressList
object such as the Global Address List (GAL) and corresponds to an Exchange user.