Automation · VBA

Email Workbook via Outlook

Attach the current workbook to a new Outlook email.

download.bas (ES) download.bas (EN)
' 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:

  1. Open your workbook and press Alt + F11 to open the VBA editor.
  2. Choose Insert ▸ Module and paste the code (or File ▸ Import File for the .bas).
  3. Press F5 to run, or run it from Developer ▸ Macros.
  4. 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

Related macros