I have been looking for a VBA that can send the entire workbook.
I found this
Sub Mail()
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 = "mymail@domain.com"
.CC = ""
.BCC = ""
.Subject = Range("A1").Value
.body = ""
.Attachments.Add ActiveWorkbook.FullName
.send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
But when opening the sent mail, the workbook is all empty. So I have to save the workbook before using VBA.
Is there a workaround for this, so it just work as normal File -> Save and send -> Send as attachment?