VB Code for Outlook CC recepient

Joined
Apr 8, 2008
Messages
1
Reaction score
0
Can anyone help me with VB code that will send an email To: AND CC: in Outlook via a hyperlink on an excel spreadsheet. The To: part is easy, it's adding a CC: address where I'm having trouble. I also want to have a cell value put in the Subj: line. Any help is deeply appreciated.
 
This is the order of the parameters that your email should be sent.

[objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]

I setup a variable strEmailAddressCC for the CC and use it right after the to or in my case below strEmailAddress

DoCmd.SendObject , , acFormatRTF, strEmailAddress, strEmailAddressCC _
, , strSubject, strEMailMsg, False, False

For your subject line create a variable Dim strSubject As String

strSubject = "First Error Escalation for:" & " " & rs![FirstName] & " " & rs![LastName] &
 
Back
Top