How to Fix Word Mail Merge Filters Resetting Automatically
Question details
Users experience an issue in Microsoft Word where mail merge filters connected to a SQL Server database automatically lose their saved criteria, particularly when a specific field like 'Type' is included in the query.
- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Filtering recipient lists during a mail merge operation connected to a SQL Server database.
- Observed behavior
- The filter dialog loses its saved criteria and resets, causing synchronization loss with the underlying SQL query, especially if the Edit Recipient List dialog is opened.
Verify your current Microsoft Word version by navigating to File > Account > Product Information, as this bug behavior is often tied to specific application builds.
Apply a VBA Macro Workaround to Set the Query String
Use a VBA macro to manually capture filter values and apply them directly to the data source, bypassing the unstable filter dialog.
Because adding certain fields like the 'Type' field causes the Word filter dialog to lose synchronization with the underlying SQL query, you can bypass the standard user interface using VBA. This macro will programmatically enforce the query criteria directly to the document's mail merge data source.
Press Alt + F11 in Word to launch the Visual Basic for Applications (VBA) editor.
Design a custom VBA user form to prompt for and collect your required filter parameters, such as the start, end, and type values.
Write a script that takes the inputted values and updates the document's MailMerge.DataSource.QueryString directly to execute the desired SQL filter.
Run your macro to apply the query and complete your mail merge process without relying on the built-in Microsoft Word filter dialog.
Report the Bug via the Microsoft Feedback Portal
Submit a detailed bug report to Microsoft so their development team can address the SQL filter synchronization issue in a future update.
Experience Flawless Document Operations with WPS Office
Tired of troubleshooting macro errors and mail merge synchronization bugs in Microsoft Word? WPS Office provides a lightweight, highly compatible alternative with an intuitive and stable Mail Merge feature. It natively supports Microsoft Office formats and easily manages complex data sources without the hassle.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package.
- 2. Install the Suite: Run the downloaded installer and follow the quick on-screen instructions to set up the software.
- 3. Open Your Documents: Launch WPS Writer and directly open your existing Word documents and data sources to continue working smoothly.

Frequently Asked Questions
Why does the Word Mail Merge filter dialog clear my criteria automatically?
This happens due to a known synchronization issue in Microsoft Word when handling SQL Server queries. Including specific fields, such as the 'Type' field, in your filter causes the dialog UI to lose synchronization with the underlying database query.
Can I prevent the 'Edit Recipient List' dialog from resetting my VBA query string?
Unfortunately, opening and confirming the built-in 'Edit Recipient List' dialog forces Word to refresh its interface, which overwrites and clears the custom MailMerge.DataSource.QueryString you set via VBA. The only prevention is to avoid opening the dialog after running the macro.
Where do I find my current Microsoft Word version to report this bug?
Open Microsoft Word, click on 'File' in the top ribbon, select 'Account', and look under the 'Product Information' section to find your exact build and version number.
Does WPS Office include a Mail Merge feature?
Yes, WPS Writer includes a fully-featured Mail Merge tool that allows you to easily connect spreadsheets or databases to your documents to generate mass letters, envelopes, and labels.




