Hi All,
I currently have a Macro-enabled spreadsheet which contains a UserForm that recipients complete. Once they click 'Submit' on the UserForm, the values they've entered in the UserForm are copy/pasted onto a table in a 2nd tab (which is hidden) and the whole spreadsheet is sent automatically to an email address. The sender receives an auto response saying thanks and that their UserForm has been sent (set as Rule in Outlook).
I would like the contents of this 2nd tab (basically a table) to be included in the auto-response email as their 'Receipt' of what has been confirmed in the UserForm for that month.
The hidden tab is set as 'xlSheetVeryHidden' in VBA if that makes a difference?
The VBA code I have to send the Spreadsheet at the moment is:
Sub Mail_Workbook_1()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
ActiveWorkbook.Save
With OutMail
.To = "[email protected]"
.CC = ""
.BCC = ""
.Subject = "Forecast Submission"
.Body = "See attached latest forecast"
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Kind Regards
jusmightbeokay
Bookmarks