Excel VBA Send Email in New Outlook: What Actually Works

VBA & macros · Updated November 3, 2026

Excel VBA Send Email in New Outlook: What Actually Works

Excel VBA cannot directly automate the new Outlook for Windows: the new app does not provide the classic Outlook COM automation interface that VBA uses. To create and send messages from a macro, use classic Outlook for Windows with a configured account, or choose an alternative such as Power Automate; a simple change to the VBA code will not make it control new Outlook.

Why new Outlook behaves differently

Many Excel email macros rely on Outlook’s Object Model, a Windows programming interface available in classic Outlook. A macro asks Windows to start or connect to Outlook, creates a message, fills in its fields, and then displays or sends it. New Outlook for Windows is a different application architecture and does not expose that COM interface. As a result, a command such as CreateObject("Outlook.Application") cannot connect to new Outlook as it can to classic Outlook.

This distinction is easy to miss because both apps are called Outlook and can use the same Microsoft 365 mailbox. The relevant question is not which mailbox you use, but which Outlook application is installed and available for automation. If the computer has only new Outlook, an Excel macro built around Outlook.Application will generally fail, often with an ActiveX component or automation error. The exact message depends on the computer and its configuration.

Changing the macro from early binding to late binding, or changing a reference in the VBA editor, does not add an interface that the application does not provide. Those approaches can help with compatibility between versions of classic Outlook, but they do not turn new Outlook into a COM server.

What works with classic Outlook

On Windows, Excel VBA can create a message through classic Outlook if classic Outlook is installed and an account is set up in it. The following example creates a draft and opens it for review. It deliberately uses Display rather than Send, so the person running the macro can check the recipient and contents before sending.

Sub DraftEmailWithClassicOutlook()
    ' Create a draft using classic Outlook for Windows.
    Dim olApp As Object
    Dim mail As Object

    Set olApp = CreateObject("Outlook.Application")
    Set mail = olApp.CreateItem(0)

    With mail
        .To = "recipient@example.com"
        .Subject = "Monthly report"
        .Body = "Hello," & vbCrLf & vbCrLf & _
                "The report is ready for review."
        ' Optional: uncomment and change this path to attach a file.
        '.Attachments.Add ThisWorkbook.Path & "\Report.xlsx"
        .Display
    End With

    Set mail = Nothing
    Set olApp = Nothing
End Sub

In Excel for Microsoft 365 on Windows, save a copy of the workbook first, then press Alt+F11, choose Insert > Module in the Visual Basic Editor, paste the code, and run the macro. On a Mac, the editor can be opened with Option+F11 (some keyboards also require Fn), but this Windows COM example is not a Mac solution: Excel for Mac cannot use the Windows Outlook COM interface. Outlook for Mac needs a different approach.

To add an attachment, replace the example path with the full path to the file. ThisWorkbook.Path gives the folder containing the workbook, but the workbook must have been saved for that folder path to be useful. If you use a variable or a worksheet cell for the path, validate that it points to an existing file before creating the message. A bad path can stop the macro or create a draft without the expected attachment.

How the macro handles a message

CreateObject starts or connects to the registered classic Outlook application. CreateItem(0) requests a standard email item. The macro then assigns the To field, subject, and plain-text body. Outlook remains responsible for the actual account, mail transport, signatures, and send process; the VBA code is preparing a message, not sending mail directly from Excel.

The sample uses late binding by declaring Outlook objects As Object. That avoids requiring a particular Outlook object library reference to be selected in the VBA editor, which can make a workbook easier to open on other Windows computers that have classic Outlook. Late binding does not remove the need for classic Outlook itself, nor does it bypass Outlook security or organizational policy.

For a simple message, .Body is plain text. Classic Outlook also supports HTML message bodies through its Outlook Object Model, but HTML requires care: encode characters from worksheet data so they cannot accidentally be interpreted as markup, and use a clear template rather than concatenating unpredictable cell contents. Test the layout in a draft, especially when recipients use different mail clients.

Choosing between classic Outlook and new Outlook

If Excel automation is a regular part of the process, first check whether classic Outlook is available on the Windows computer. Some Microsoft 365 installations provide both applications, while some environments may have moved users to new Outlook or may not include classic Outlook. Availability can depend on the license, installation, and organization’s deployment choices. Do not assume that switching to new Outlook removes classic Outlook, or that classic Outlook is installed simply because new Outlook opens the mailbox.

  • Use classic Outlook VBA when the computer has classic Outlook, the macro runs interactively on Windows, and a person can review each draft.
  • Use Power Automate when the email process should run in a cloud workflow or be triggered by a supported business event, subject to available connectors, licensing, and company policy.
  • Use Microsoft Graph when a developer can implement modern authentication and the required app permissions have been approved. This is a more substantial integration than a short VBA macro.
  • Use a mailto link when the goal is only to open a prefilled message for a person to finish. It is not a substitute for automated attachment handling or unattended sending.

For occasional use, a reviewed draft in classic Outlook is often the simplest path if it is available. For scheduled or shared processes, avoid tying the automation to one employee’s desktop and mailbox profile. A managed flow or application integration is usually easier to govern, monitor, and maintain, although it takes more setup.

Alternatives when only new Outlook is installed

Power Automate can send mail through Microsoft 365 connectors as part of a flow, for example after a row is added to a supported data source or after a user submits a form. The exact trigger and connector depend on where the workbook is stored and how the data is structured. A workbook open on someone’s desktop is not automatically a dependable cloud trigger. For a repeatable flow, use a supported trigger and keep data in a location the flow can access, such as an approved SharePoint or OneDrive location. Check the organization’s licensing and data-loss-prevention policies before building it.

Microsoft Graph can send email using Microsoft identity and permissions, but it is not a one-line VBA replacement for Outlook.Application. An implementation must obtain and handle access tokens securely, request appropriate permissions, and comply with tenant consent and security requirements. Do not paste a client secret, password, or long-lived token into a workbook: workbooks can be copied, emailed, or inspected. Ask an administrator or developer to design the authentication and permission model.

A mailto link can open the user’s default mail application with a recipient, subject, or short body prefilled. It still requires the user to review and send the message, and it has practical limits on message length and encoding. It does not offer the same dependable control over attachments, formatting, or background processing as Outlook automation. It can be useful for a button that starts a human-reviewed email, not for sending a report to a list unattended.

SMTP is another possible route only when the mail service and authentication method permit it. Microsoft 365 SMTP AUTH settings can be disabled for an organization or mailbox, and authentication requirements have changed over time. The older CDO-based VBA examples commonly found online are not a generally reliable modern Microsoft 365 solution and can expose credentials if written carelessly. Confirm the mail provider’s current requirements with an administrator before choosing SMTP.

Common failures and how to diagnose them

  • ActiveX or automation error: Check that classic Outlook for Windows is installed and configured. If only new Outlook is available, this macro’s Outlook.Application call has no supported target.
  • Outlook opens but no account is ready: Sign in and complete account setup in classic Outlook, then try creating a message manually before running the macro.
  • The macro is blocked: Excel macro settings, downloaded-file protections, or organization policy may prevent execution. Only enable macros from a trusted source; do not lower security settings broadly to run an unfamiliar workbook.
  • Messages are not sent automatically: The example uses .Display, which opens a draft by design. Replacing it with .Send initiates sending without the review step, but it still depends on Outlook, the configured account, and applicable policy.
  • A security prompt appears: Outlook’s programmatic access protections and managed security controls can affect automation. Do not try to defeat these controls; ask the Microsoft 365 administrator which approved method is appropriate.
  • An attachment is missing: Verify the full file path and access permissions. If the workbook is in a cloud location, its URL is not necessarily a local file path that the attachment method can use.

For diagnosis, test with one recipient and a harmless subject, and leave the message open for inspection. Avoid testing with a real distribution list. If the workbook is shared, remember that each user may have a different Outlook installation, account profile, macro policy, and access to the files referenced by the code.

Safety and reliable email practices

Email macros can send confidential data to the wrong person very quickly. Keep the review step unless there is a documented reason for unattended sending. If a business process genuinely requires automatic delivery, validate addresses against an approved source, restrict who can edit the workbook, log what was sent, and test failure cases such as blank recipients or missing attachments. An accidental .Send in a loop can create many messages before the user can intervene.

Also consider data minimization: attach only the necessary report, check whether it contains hidden sheets or personal information, and use approved sharing controls for sensitive material. Save a copy of the workbook before running any macro. VBA actions cannot be undone with Ctrl+Z, and a macro may change workbook data or create external side effects even if its email step fails.

Frequently Asked Questions

Can Excel VBA send email from new Outlook?
No, not through the classic Outlook.Application COM interface. New Outlook for Windows does not expose that interface. Use classic Outlook on Windows for that style of macro, or choose a supported alternative such as Power Automate or a properly configured Microsoft Graph integration.

Will the same VBA code work if I switch back to classic Outlook?
It can, provided classic Outlook is installed, configured with an account, and allowed by your organization’s policies. Test the macro by displaying a draft first. Having the same Microsoft 365 account in both Outlook apps does not itself guarantee that the classic app is installed or configured.

Can Excel VBA send an email without Outlook?
Not with the Outlook Object Model shown here. Other methods, including Graph or SMTP, require their own authentication, service configuration, and permissions. A mailto link can open a message for a person, but does not provide dependable unattended sending.

Does this macro work in Excel for Mac?
No. The sample uses Windows COM automation, which Excel for Mac does not support. Outlook for Mac also does not provide the same Windows Outlook Object Model. A Mac workflow needs a separate method, such as an approved cloud flow or a platform-specific integration.

Can I replace .Display with .Send?
In classic Outlook VBA, .Send requests that Outlook send the message, but it removes the person’s chance to review the draft first. It may still be affected by account setup, security controls, or organizational policy. Use it only when automated sending is authorized and recipients and content are carefully validated.

Does changing to late binding make the code compatible with new Outlook?
No. Late binding avoids a compile-time reference to the Outlook object library, but it still calls Outlook.Application at runtime. Since new Outlook does not expose the COM automation interface, late binding cannot make this method work with it.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.