Fix a Blank Outlook Email Body in a VBA Mail Merge
Question details
The user needs Word content to appear in Outlook email bodies generated by 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.
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.
Check Outlook Startup and Wait for the Email Editor
Use this approach when message bodies are blank, especially if the macro starts Outlook itself.
Open Outlook first, then run the mail merge macro from Word using Developer > Macros. Check the draft message body before sending.
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.
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.
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.
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.

Isolate Word Content and HTML Editor Issues
Use a simple document to determine whether the blank body is caused by document content or the macro's message-editing sequence.
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.

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.




