You can schedule an email from Excel using VBA by having your macro build the message with the Outlook object library and then either send it immediately or save it to the Outbox and let Outlook deliver it at the time you choose. The most reliable approach is to create the email with CreateItem, set To, Subject, Body, and Send, and pair that with Outlook's built-in delay delivery or Windows Task Scheduler for unattended runs. This guide walks through the safe, official method using Outlook on Windows, because VBA's Outlook automation is a desktop Outlook feature and does not work the same way in Outlook on the web or on Mac without additional setup.
What You'll Need
- Microsoft Excel with the Developer tab enabled (File > Options > Customize Ribbon > check Developer).
- Microsoft Outlook desktop app installed and signed in on the same Windows PC, because the macro talks to Outlook through its object library.
- Macro security set to allow macros in the workbook you trust (File > Options > Trust Center > Trust Center Settings > Macro Settings).
- A workbook saved as .xlsm so the VBA code is retained.
- For unattended scheduling, Windows Task Scheduler and a Windows account that stays signed in, since Outlook automation needs an active Outlook session.
Note that menu labels can differ slightly by Office version, device, and region. The steps below are written for Excel and Outlook on Windows desktop.
Step-by-Step
- Open the VBA editor. In Excel, press Alt+F11. In the Project pane, right-click your workbook and choose Insert > Module. This is where the scheduling code will live.
- Add a reference to Outlook. In the VBA editor, go to Tools > References and tick Microsoft Outlook Object Library. If you skip this, the macro will fail with a compile error on Outlook objects.
- Write the basic send macro. Paste a short routine that creates an Outlook application, builds a mail item, fills in the recipient, subject, and body, and calls
Send. Keep the body as plain text first so you can confirm it works before adding formatting. - Pull recipients and content from cells. Instead of hard-coding addresses, read them from worksheet cells, for example
Range("B2").Valuefor the To line andRange("B3").Valuefor the subject. This lets you change who gets the email without editing code. - Decide between immediate send and delayed delivery. For immediate send, call
.Send. For a scheduled send, set theDeferredDeliveryTimeproperty on the mail item to the date and time you want, then call.Send. Outlook holds the message and delivers it at that time. - Save instead of send when testing. Replace
.Sendwith.Saveand check the Drafts folder. This confirms the message is built correctly before anything leaves your account. - Add error handling. Wrap the Outlook calls in
On Error GoToand show a message box with the error number and description. Outlook automation can fail if Outlook is closed, not signed in, or blocked by security prompts, and a clear message saves guesswork. - Release the Outlook objects. Set the mail item and application objects to
Nothingat the end. Leaving them open can keep Outlook running in the background and cause the next run to fail. - For unattended runs, schedule the workbook. Save the workbook, then create a task in Windows Task Scheduler that opens Excel with the file and runs your macro, or use a workbook
Workbook_Openevent that checks the time and sends only when due. The Windows account running the task must be signed in with Outlook open, because Outlook automation is not a server-side service. - Test with your own address first. Send to yourself, confirm the message arrives and the timestamp is what you expected, then switch to the real recipients.
Common Mistakes
- Forgetting the Outlook object library reference, which causes a compile error before the macro even runs.
- Using
.Displaywhen you meant.Send, so nothing is actually delivered. - Setting
DeferredDeliveryTimeto a time in the past, which makes Outlook send immediately. - Leaving Outlook closed. The macro cannot start Outlook reliably on its own in every configuration, so keep Outlook running for scheduled sends.
- Hard-coding email addresses and then editing the wrong line when recipients change.
- Running scheduled tasks under an account that is signed out, so the macro never fires.
Tips
- Store recipients, subject, body, and send time in named cells so non-technical users can update them safely.
- Use
Format(Now, "yyyy-mm-dd hh:mm")when writing timestamps to a log sheet so you can audit what was sent and when. - Keep a copy of every sent message by setting the
SaveSentMessageFolderproperty or by saving to a dedicated folder. - Test with
.Savebefore.Sendevery time you change the code. - If you need HTML formatting, set
.HTMLBodyinstead of.Body, and build the HTML string in a cell or a separate function.
Troubleshooting
If the macro does nothing, first check that Outlook is open and signed in, then confirm the reference is ticked, then step through the code with F8 to see which line stops. If you get a permission or security prompt, review Trust Center settings in both Excel and Outlook; do not disable protections globally. If a scheduled send does not arrive, open Outlook and check the Outbox and Sent Items, confirm the deferred time is in the future, and verify the Task Scheduler task ran under the correct signed-in account. If Outlook automation fails repeatedly, close Excel and Outlook, reopen Outlook first, then Excel, and try again. As a last resort, repair Office from Settings > Apps, but note that this can take time and does not delete your files.
Frequently Asked Questions
Can Excel VBA send email without Outlook?
Not reliably through the built-in VBA method. The standard approach uses Outlook on Windows. Other methods exist through external services, but they require separate setup and are outside what VBA does natively.
Does delayed delivery work if my PC is off?
No. Outlook must be running and the PC awake at the scheduled time for the message to leave the Outbox. Keep the machine on and Outlook open, or use a machine that stays powered.
Why does my macro show a compile error on Outlook objects?
The Outlook object library reference is missing. Add it under Tools > References in the VBA editor, then run the macro again.
Can I schedule recurring emails from Excel?
Yes, by combining a recurring Windows Task Scheduler task with a macro that checks the date and sends only when due. The workbook and Outlook must both be available at that time.
Is this safe for work email accounts?
It uses your own signed-in Outlook account, so it is as safe as sending manually. Follow your organisation's email policy, and avoid automating bulk mail without approval.
Why did my scheduled email send immediately?
The deferred time was probably in the past, or the property was set after .Send was called. Set DeferredDeliveryTime before sending and use a future date.