Elgohary11
New Member
hi there,
I have this basicvbacode and it works great. However, I'm trying to add so the current user automatically gets cc'd to the email, but I am really struggling. Can someone please help?THANKS in advance!
I have this basicvbacode and it works great. However, I'm trying to add so the current user automatically gets cc'd to the email, but I am really struggling. Can someone please help?THANKS in advance!
Code:
Sub Button1_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "technicalsupport@cnrl.com"
.CC = .””
.BCC = ""
.Subject = "Ad Hoc Report Request"
.Body = "Request form attached."
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Last edited by a moderator: