VBA & Macro Problems

How to Fix Word MailMerge OpenDataSource Macro Error After Update

Huma Ashraf ChHuma Ashraf Ch Oct 15, 2026 869 views

Question details

Users experience a macro-related error when a VB.NET application attempts to execute the MailMerge.OpenDataSource method after an Office update.

Fixing the Word MailMerge OpenDataSource Macro Error After Office Updates
Product
Microsoft Word
Device & OS
not provided
Scenario
Running a VB.NET application that integrates with Word to generate and merge documents automatically.
Observed behavior
The system throws an error stating that the MailMerge.OpenDataSource method is unavailable because a macro is currently running, which blocks document generation.
Before you start

Verify your current Microsoft Office version number (specifically if you are on version 2211) and ensure your document templates are stored on a local drive rather than a restricted network location.

Solution 1Recommended

Update Microsoft Office to Version 2302 or Later

Microsoft resolved this bug in build 16130.20128. Updating your Office client is the most reliable way to restore MailMerge functionality without changing your application code.

The issue was caused by a change in security policies regarding internet macros introduced in version 2211. Upgrading to the Current Channel Preview build 16130.20128 (Version 2302) or newer provides an official fix.

1
Open MS Word Account Settings

Launch Microsoft Word, click on 'File' in the top left corner, and select 'Account' from the bottom left menu.

2
Trigger Office Update

Under the 'Product Information' section, click on the 'Update Options' dropdown and select 'Update Now'.

3
Verify Version and Test

Wait for the update process to complete. Ensure your version number is at least 2302 (Build 16130.20128) and restart your VB.NET application to confirm the mail merge runs without error.

Update Microsoft Office to Version 2302 or Later
Update Successful: Once updated to version 2302, your application should be able to generate and merge documents without any code changes.
Free Microsoft Office alternative

Use WPS Office for Reliable Document Automation

If Microsoft Office updates frequently disrupt your workflow with unexpected bugs, consider switching to WPS Office. It is a lightweight, highly compatible alternative that supports macros and seamless document processing without the overhead.

  1. 1. Download and Install: Get WPS Office from the official website and run the simple installation process.
  2. 2. Open your Document: Launch WPS Writer and load your mail merge templates without formatting loss.
  3. 3. Run Macros: Enable macros in WPS Office to continue executing your automated document generation tasks smoothly.
Highly compatible with Microsoft Word formats (.docx, .doc, .dotm)Supports VBA and macro execution for automated tasksLightweight and fast document renderingFree to download and use with a familiar interface
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get a 'macro is running' error during MailMerge after updating Office?

This misleading error often occurs due to a bug introduced in Office version 2211 related to security policies blocking content execution from the internet, which inadvertently causes MailMerge.OpenDataSource to fail.

Can I fix the MailMerge error by adding the template to a Trusted Location?

Previously, placing templates in a Word Trusted Location worked as a workaround. However, after the version 2211 update, this method is no longer effective for many users. Updating Office is the recommended solution.

Is there a coding workaround for the OpenDataSource error?

Yes. Developers can change their VB.NET application code to use the Documents.Add method instead of the Documents.Open method. This bypasses the security trigger block until the Office application can be updated.