Automation · VBA
Email Workbook via Outlook
Attach the current workbook to a new Outlook email.
- Attaches the active workbook
- Pre-fills subject and body
- Shows a draft (no auto-send)
' Emails the active workbook as an attachment via Outlook (shown as a draft).
Sub EmailWorkbookViaOutlook()
Dim outlookApp As Object, mail As Object
Set outlookApp = CreateObject("Outlook.Application")
Set mail = outlookApp.CreateItem(0)
With mail
.To = "recipient@example.com"
.Subject = ThisWorkbook.Name
.Body = "Hi," & vbCrLf & vbCrLf & _
"Please find the attached file." & vbCrLf & vbCrLf & "Thanks."
.Attachments.Add ThisWorkbook.FullName
.Display ' change to .Send to send automatically
End With
End Sub
Free to use and modify · ExcelBot — excelempowers.com
Creates an Outlook email with the current workbook attached and shows it as a draft to review before sending.
How to install:
- Open your workbook and press Alt + F11 to open the VBA editor.
- Choose Insert ▸ Module and paste the code (or File ▸ Import File for the .bas).
- Press F5 to run, or run it from Developer ▸ Macros.
- Save your file as .xlsm (macro-enabled) to keep the macro.
No VBA? In ExcelBot you can do the same thing by just asking the AI in plain language.
email
outlook
send
automation
correo
enviar
Rather not use VBA?
In ExcelBot you get the same result by asking the AI in plain language — no macros needed.
Try ExcelBot free Browse more macros