Yes, Excel VBA can still send email through the new Outlook for Windows, but not the old way. The classic Outlook.Application automation code that worked with classic Outlook is unreliable with the new Outlook because the new app does not expose the same COM automation model. The practical answer for most people is one of two routes: keep classic Outlook on the machine and automate it with CreateObject("Outlook.Application"), or keep the new Outlook for daily mail and switch the VBA to send through SMTP, which the new Outlook does not block. If you only need to compose and send messages from Excel, SMTP is the safest long-term choice because it does not depend on which Outlook version people have.

Before starting, know this: the new Outlook for Windows is a rebuilt app and Microsoft has been moving it toward web-based technology. Automation that assumes classic Outlook objects such as MailItem, Folders or the MAPI namespace may fail with errors like "ActiveX component can't create object" or "The Outlook object model is not available." That failure is not a bug in your macro. It is a sign you are trying to drive an app that no longer offers that interface. Rather than fight it, choose the route that matches your setup.

What You'll Need

  • Excel with the Visual Basic Editor available (desktop Excel for Windows, not Excel for the web).
  • Either classic Outlook installed alongside the new Outlook, or an email account that supports SMTP sending, such as a Microsoft 365, Gmail or other provider account.
  • If using SMTP: the server name, port, encryption type and login details for your mail provider, taken from the provider's official help pages.
  • A macro-enabled workbook saved as .xlsm, or you will lose your code on close.
  • Macro security settings that allow your own macros to run, which you control under File > Options > Trust Center > Trust Center Settings > Macro Settings.

Step-by-Step

Route A: Automate classic Outlook (works only when classic Outlook is installed)

  1. Confirm classic Outlook is actually installed, not just the new app. Open the Start menu and search for Outlook (classic), or check Settings > Apps > Installed apps. If only "Outlook (new)" is listed, this route will not work.
  2. Open your workbook and press Alt+F11 to open the Visual Basic Editor. Menu labels can differ slightly by version and region, but Alt+F11 is consistent.
  3. In the editor choose Insert > Module, then paste a short routine that creates the Outlook application object, builds a MailItem and calls Send. Keep the code minimal first and test with your own address as the recipient.
  4. Run the macro with F5. The first time, Windows may show a security prompt asking whether to allow programmatic access to Outlook. Outlook has a setting under Trust Center > Programmatic Access that governs this; if the prompt is blocked, an administrator may need to change it.
  5. Check the Sent Items folder to confirm delivery, then expand the code to loop through rows in your sheet, one email per row, pulling addresses and subject lines from cells.

Route B: Send by SMTP from VBA (works regardless of which Outlook version is installed)

  1. Look up your provider's SMTP settings on its official help page. You need the server hostname, port, whether SSL/TLS is required, and whether your normal login password works or you need an app password.
  2. In Excel press Alt+F11, choose Insert > Module, and use the built-in CDO library (Microsoft CDO for Windows 2000 Library) to construct and send the message. This uses only components shipped with Windows, so nothing extra needs installing.
  3. Optionally add a reference via Tools > References, or use late binding so the code runs without any reference at all. Late binding is more portable between machines.
  4. Store credentials carefully. Do not hard-code passwords in a shared workbook. Put them on a hidden sheet, in the Windows credential store, or prompt for them at runtime.
  5. Test with one message to yourself, confirm it arrives, then wrap the send call in a loop over your data range. Add a small pause between messages and an error handler so one bad address does not stop the whole run.

Common Mistakes

  • Assuming the new Outlook exposes the same object model as classic. It does not, and code copied from older tutorials will often fail with "ActiveX component can't create object."
  • Leaving the workbook as .xlsx. Macros are stripped on save, so always save as .xlsm.
  • Sending test emails to colleagues instead of yourself. Always test to your own address first.
  • Hard-coding a password into a workbook that gets shared or emailed. Anyone who opens it can read the code.
  • Sending hundreds of messages in a burst. Providers rate-limit, and accounts can be temporarily blocked. Add a delay and check your provider's sending limits.
  • Forgetting that recipients see exactly what you send. A missing subject or a blank greeting looks like spam and may be filtered.
  • Using Display instead of Send in automated runs and then leaving a stack of unsent drafts open.

Tips

  • Build the email body from cells rather than hard-coding text, so non-coders can update wording in the sheet.
  • Validate addresses before sending. A simple check for an @ and a dot in the domain catches most typos.
  • Log each send to a sheet with a timestamp and status column. When something fails, you know exactly where it stopped.
  • Attach files with full paths and check the file exists before attaching, otherwise the macro errors at the worst moment.
  • If a colleague uses a different Outlook version, prefer SMTP so the workbook behaves the same on every machine.
  • Turn off screen updating while the macro runs to speed things up, but remember to turn it back on in the error handler.

Troubleshooting

If you get "ActiveX component can't create object" or "The Outlook object model is not available," you are almost certainly on the new Outlook without classic installed, or the security prompt was blocked. First check whether classic Outlook is available and, if not, switch the macro to the SMTP route. If classic Outlook is installed but the prompt is blocked, ask your administrator about the Programmatic Access setting under Trust Center.

If messages send from your test but not from a loop, the usual culprits are blank or malformed addresses, a missing reference in the current row, or a provider rate limit kicking in. Add an error handler that writes the failing row number to your log sheet and continues to the next row.

If SMTP authentication fails, re-check the port and encryption combination against the provider's official settings. Many now require an app password rather than your normal login, especially when two-step verification is on. If messages land in spam, shorten the subject, remove excessive links and avoid all-caps wording.

Frequently Asked Questions

Does the new Outlook support VBA macros?

The new Outlook for Windows does not run VBA macros in the way classic Outlook does, and it does not offer the same automation interface from other Office apps. Your Excel macros still run in Excel; it is the Outlook automation they call that is limited.

Can I use both classic and new Outlook on the same PC?

Yes, in many setups both can be installed, and you can switch between them. Automation code only works while classic Outlook is the one running behind the scenes.

Is SMTP sending safe for work accounts?

It can be, but check with your IT team first. Many organisations block SMTP sending or require an approved app password, and bypassing those rules is not advisable.

Why does my macro work on my PC but fail on a colleague's?

Different Outlook versions, different macro security settings, or a missing reference are the usual causes. Late binding and SMTP reduce these differences significantly.

Will Outlook show a warning to recipients about automated mail?

Outlook itself does not label macros, but mail filters may treat bulk automated messages as spam. Keep volume low, use accurate subjects and send only to people who expect your mail.