Hello all,
I've been googling this issue for a while, and i'm having little/ no luck!
I've got a spreadsheet with a button that saves then sends a copy of the spreadsheet to a specific email address. My client has asked whether it is possible to send a copy of this email to the Sender as well.
I know its possible to include more email addresses (in the "CC" box) but I don't know how to automatically include the sender into the email
Any help would be greatly appreciated!
here is my current code:
Private Sub CMD_Save_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "XXXX@XXXXX.com"
.CC = "" - here is where I want to auto include the email address of the sender
.BCC = ""
.Subject = "Change to Visitor Booking Form"
.Body = "A change has been made to the Visitor Booking form. Please review."
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Many thanks in advance!
- Jon
Bookmarks