Add CC Recipient to Outlook 2010 VBA

Can someone please show me how to add a "Cc-receiver" to this code? To the "recipient" and the code, everything works as intended. Thank you for your time.

Sub ForwardEmail(item As Outlook.MailItem)
' Dim oExplorer As Outlook.Explorer
Dim oMail As MailItem
' Set oExplorer = Application.ActiveExplorer

On Error GoTo Release

' If oExplorer.Selection.item(1).Class = olMail Then

Set oMail = item.Forward
oMail.Subject = oMail.Subject
oMail.HTMLBody = "Have a nice day." & vbCrLf & oMail.HTMLBody
oMail.Recipients.Add "email address here"

' oMail.Save
oMail.Send

' End If

Release:
Set oMail = Nothing
' Set oExplorer = Nothing
End Sub
+4
source share
1 answer
set oRecip = oMail.Recipients.Add("email address here")
oRecip.Type = olCC

or

oMail.CC = "email address here"
+7
source

All Articles