You can send emails directly from Excel using VBA macros that automate the new Outlook desktop app, allowing you to send personalized messages to multiple recipients without leaving your spreadsheet.

What You'll Need

  • Microsoft Excel (desktop version, part of Microsoft 365 or Office 2021 or later)
  • The new Outlook for Windows desktop app (not Outlook on the web)
  • Basic familiarity with Excel and the VBA editor
  • An email account configured in the new Outlook app

Step-by-Step

  1. Open your Excel workbook and press Alt + F11 to launch the VBA editor.
  2. In the VBA editor, go to Insert > Module to create a new code module.
  3. Paste the following VBA code into the module window:
    Sub SendEmailFromExcel()
        Dim OutlookApp As Object
        Dim OutlookMail As Object
        Dim Cell As Range
        Dim Recipient As String
        Dim Subject As String
        Dim Body As String
        
        Set OutlookApp = CreateObject("Outlook.Application")
        
        ' Assumes data starts in row 2, with email in column A, subject in B, body in C
        For Each Cell In Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row)
            Recipient = Cell.Value
            Subject = Cell.Offset(0, 1).Value
            Body = Cell.Offset(0, 2).Value
            
            If Recipient <> "" Then
                Set OutlookMail = OutlookApp.CreateItem(0)
                With OutlookMail
                    .To = Recipient
                    .Subject = Subject
                    .Body = Body
                    .Send
                End With
                Set OutlookMail = Nothing
            End If
        Next Cell
        
        Set OutlookApp = Nothing
        MsgBox "Emails sent successfully!", vbInformation
    End Sub
  4. Close the VBA editor and return to your Excel sheet.
  5. Prepare your data: in column A, list recipient email addresses; in column B, enter the subject line for each email; in column C, write the full body text.
  6. Press Alt + F8, select SendEmailFromExcel, and click Run.
  7. When prompted by Outlook about programmatic access, click Allow to permit Excel to send emails via Outlook.
  8. Check your Outlook Sent Items folder to confirm the emails were delivered.

Common Mistakes

  • Using Outlook on the web instead of the desktop app — the VBA CreateObject("Outlook.Application") method only works with the locally installed Outlook client.
  • Forgetting to enable macro security: if macros are disabled, the code won’t run. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings and select Enable all macros (not recommended for long-term use; better to sign your macro or use a trusted location).
  • Incorrect column mapping: ensure your data aligns with the code (A = recipient, B = subject, C = body). Mismatched columns cause blank or misdirected emails.
  • Not handling empty rows: the loop skips blank recipient cells, but if your data has gaps, double-check your range.
  • Antivirus or security software blocking Outlook automation — some enterprise policies restrict programmatic email sending.

Tips

  • Test with one or two rows first by changing the loop range (e.g., A2:A3) before running on your full list.
  • Use .Display instead of .Send during testing to review emails before they are sent.
  • Save your workbook as a macro-enabled file (.xlsm) to preserve the VBA code.
  • Add error handling with On Error Resume Next and log errors to a column if sending fails for specific rows.
  • If you frequently send emails from Excel, consider saving this macro in your Personal Macro Workbook for reuse across files.

Troubleshooting

  • Macro doesn’t run or gives a “compile error”: Ensure you pasted the code correctly into a standard module, not a sheet or ThisWorkbook module. Recheck for typos in CreateObject or variable names.
  • “Outlook.Application” object not found: Confirm the new Outlook desktop app is installed and set as your default email client. The VBA method relies on the local Outlook COM interface.
  • Security prompt blocks email sending: Go to Outlook’s File > Options > Trust Center > Trust Center Settings > Programmatic Access and choose Never warn me about suspicious activity (not recommended) or manually allow access each time. For better security, use a digital signature for your macro.
  • Emails go to Outbox but don’t send: Open Outlook and check if it’s working online. Send/receive manually (F9) or restart Outlook to flush the Outbox.
  • Recipients report missing or garbled text: Avoid using rich text formatting in the body column unless you switch to .HTMLBody and provide proper HTML. Plain text is most reliable.
  • Still not working? Repair your Office installation via Settings > Apps > Installed apps > Microsoft Office > Modify > Quick Repair. If the issue persists, try an online repair.

Frequently Asked Questions

Can I send emails using Outlook on the web from Excel?

No, the VBA CreateObject("Outlook.Application") method only works with the desktop Outlook client. Outlook on the web does not expose a COM interface for automation.

Is it safe to enable macros for this?

Enabling macros carries risk if the workbook comes from an untrusted source. Only enable macros in files you create or trust. Consider signing your VBA project with a digital certificate for safer long-term use.

Can I send attachments using this method?

Yes. Add .Attachments.Add "C:\path\to\file.pdf" inside the With OutlookMail block before .Send to attach files.

Will this work on a Mac?

No, this VBA approach relies on Windows-specific COM objects and does not work in Excel for Mac. Mac users would need to use AppleScript or third-party tools.

How do I personalize emails with names or other data?

Include merge fields in your subject or body columns (e.g., "Hello "), then replace them in VBA using if names are in column D.

What if I get a “permission denied” error?

This often occurs due to antivirus, group policy, or Outlook security settings blocking programmatic access. Consult your IT administrator or try running Excel as administrator to test.