Send & Receive Issues

Fix a Blank Outlook Email Body in a VBA Mail Merge

Camila MilosovichCamila Milosovich Nov 20, 2026 868 views

Question details

The user needs Word content to appear in Outlook email bodies generated by a VBA mail merge.

Fix a Blank Outlook Email Body in a VBA Mail Merge
Product
Microsoft Outlook and Microsoft Word VBA
Device & OS
not provided
Scenario
A VBA macro copies Word content into HTML emails, including when Outlook is initially closed.
Observed behavior
The generated Outlook messages sometimes have blank bodies, particularly when Outlook is started by the macro.
Before you start

Check whether the macro runs in a version of Outlook that supports COM automation, such as classic Outlook for Windows. Have a small Word document and a test recipient ready so you can inspect a message before sending it.

Solution 1Recommended

Check Outlook Startup and Wait for the Email Editor

Use this approach when message bodies are blank, especially if the macro starts Outlook itself.

1
Test with Outlook open

Open Outlook first, then run the mail merge macro from Word using Developer > Macros. Check the draft message body before sending.

2
Compare a closed-Outlook run

Close Outlook, then run the same macro again. Compare the draft with the first test to see whether the issue is associated with Outlook startup.

3
Wait for the editor

In Word, open Developer > Visual Basic and inspect the code that creates the Outlook message. Display the message with MailItem.Display, then check that its Inspector and WordEditor are available before copying and pasting the Word content. Use a bounded wait or retry rather than assuming the editor is ready immediately.

4
Declare variables

In the VBA editor, add Option Explicit at the top of the module and declare each variable. Choose Debug > Compile VBAProject to find undeclared names and other compile errors.

5
Inspect the draft

Run the macro with the test document and recipient, then review the displayed message before sending. Confirm that the copied content appears in the body.

Check Outlook Startup and Wait for the Email Editor
Outlook support: The new Outlook for Windows does not support VBA or COM automation in the same way as classic Outlook. Use a supported Outlook environment for this macro.
Free Microsoft Office alternative

Prepare Mail Merge Documents with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for creating and editing documents. Its Microsoft Office format support makes it easier to move existing files into WPS, although it does not fix Outlook VBA automation.

Create and edit source documents for email campaignsCompatible with Microsoft Word DOCX, Excel XLSX, and PowerPoint PPTX filesFamiliar document-editing interfaceFree and lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the email body go blank only when Outlook is closed?

Outlook or its message editor may not be ready when the macro tries to insert content. Compare runs with Outlook open and closed, and check that the Inspector and WordEditor are available after displaying the message.

How can I find undeclared variables in my macro?

In Word, open Developer > Visual Basic, add Option Explicit at the top of the module, and select Debug > Compile VBAProject. Declare any variables reported by the compiler.

Can changing HTMLBody remove content pasted into the message?

Yes. Assigning MailItem.HTMLBody replaces the existing HTML body, so inspect any HTMLBody assignment that runs after the WordEditor paste.

Does this VBA approach work in the new Outlook for Windows?

The new Outlook for Windows does not support VBA or COM automation in the same way as classic Outlook. Test the macro in a supported Outlook environment.