Hi,
I have a macro that sends an email with text in the subject and body. The excel file itself is a form that users will use to input information then send to another email address. The file is saved as a blank template on a local drive so that different people can access it at any time. For this reason, I can't have them saving over the template. I'd like them to fill the form in then send it via a button with the macro below. The issue I'm having is that when they send the form, it doesn't send with the information they've just entered. Instead, it sends the saved excel file which is a blank template. Does anyone know of a way to alter the macro below so that it sends the active workbook rather than the saved workbook which is blank?
cheers,
jd
Sub SendEmail()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "[email protected]"
.CC = ""
.BCC = ""
.Subject = "Sales Priority Form"
.Body = "Please attach corresponding files"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks