logo
search
VBA & Macro Problems

How to Send Emails from Excel for the Web Using VBA Alternatives

Rana GarciaRana Garcia Sep 25, 2026 868 views

Question details

The user wants to know if they can use VBA in an online Excel workbook to automatically send an email to specific recipients when certain cells meet a predefined condition.

Can VBA Send Emails from Excel for the Web?
Product
Excel for the Web
Device & OS
not provided
Scenario
Automating email notifications containing specific cell data whenever particular conditions (like a cell evaluating to TRUE) are met in an online workbook.
Observed behavior
Excel for the Web does not support or run traditional VBA macros, preventing the use of standard VBA code to trigger and send emails directly from the browser.
Before you start

Before attempting to automate your workflow, confirm whether your workbook is hosted online (Excel for the Web) or saved locally, as online environments require entirely different scripting languages and tools than desktop applications.

Solution 1Recommended

Use Office Scripts and Power Automate

Since VBA is not supported online, you can achieve the same goal by writing an Office Script to check cell values and using Power Automate to handle the email delivery.

Office Scripts use TypeScript (a superset of JavaScript) to interact with Excel for the Web. By combining this with Power Automate, you can extract the necessary data and route it to an email action seamlessly.

1
Create an Office Script

Open your online workbook, navigate to the Automate tab, and select 'New Script'. Write a TypeScript function that checks if your target cell (e.g., A1) is TRUE and returns the data you wish to send (e.g., from cell C5).

2
Set up a Power Automate Flow

Log into Power Automate and create a new automated cloud flow. Set a trigger for your flow, such as running on a specific schedule or when a file is modified.

3
Run the Excel Script

Add a new action in your flow by searching for 'Excel Online (Business)' and selecting 'Run script'. Point it to your workbook and select the Office Script you just created.

4
Configure the Email Action

Add another action for 'Send an email (V2)'. Use the dynamic content output from your Office Script to populate the email body and specify the recipient addresses.

Use Office Scripts and Power Automate
Fully Cloud-Based: This method runs entirely in the cloud, meaning your computer does not need to be turned on, and the Excel file does not need to be open for the emails to send.
Free Microsoft Office alternative

Use WPS Office to Run VBA Macros Seamlessly

If navigating Power Automate and learning TypeScript feels overwhelming, simply switch to WPS Office. WPS Spreadsheets provides powerful desktop software with full built-in VBA support, allowing you to run your traditional macros and automate emails without browser-based restrictions.

  1. 1. Download WPS Office: Install the free version of WPS Office on your desktop.
  2. 2. Open Your Workbook: Launch WPS Spreadsheets and open your .xlsm file.
  3. 3. Run Your Macros: Navigate to the Developer tab or press ALT + F11 to access the VBA editor and execute your email automation scripts natively.
Free and lightweight alternative to Microsoft OfficeHighly compatible with Microsoft Excel macro-enabled formats (.xlsm)Built-in advanced VBA editor for writing and running traditional macrosFamiliar user interface requiring zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't VBA work in Excel for the Web?

Excel for the Web operates in a browser environment, which lacks the underlying Windows COM architecture required to execute traditional Visual Basic for Applications (VBA) scripts. This is enforced for both security and cross-platform compatibility reasons.

Do I need to learn JavaScript to automate Excel online?

Yes, if you wish to write custom scripts for Excel for the Web, you will need to use Office Scripts. Office Scripts are written in TypeScript, which is a strongly typed superset of JavaScript.

Can Power Automate send emails automatically without opening the Excel file?

Yes. Once you connect an Office Script to a Power Automate flow, the automation runs in the cloud. It can evaluate your cell conditions and send emails on a schedule without requiring you to manually open the workbook.