How to Fix Word Mail Merge Filters Adding Unwanted OR Conditions
Question details
The user needs to prevent Word mail merge filters from automatically adding unintended OR conditions when filtering an Excel data source.

- Product
- Microsoft Word, Microsoft Excel
- Device & OS
- not provided
- Scenario
- Filtering an Excel data source for blank and non-blank date fields during a mail merge setup.
- Observed behavior
- Word unexpectedly expands the query and inserts an unintended OR condition into the filter logic, resulting in incorrect records being included in the mail merge.
Before applying complex mail merge filters, save a backup of your Excel data source and ensure your date fields are consistently formatted without hidden spaces.
Pre-filter the Data Source in Excel
Bypass Word's buggy query expansion by doing the filtering directly in your Excel spreadsheet before importing the data.
Because Microsoft Word struggles with interpreting blank and non-blank conditions correctly from external data sources, applying the filter in Excel first is the most reliable workaround. Word will respect the visible rows in an active Excel filter.
Open the Excel data source file that you intend to use for your mail merge.
Select your header row, navigate to the 'Data' tab on the ribbon, and click 'Filter'.
Click the filter dropdown arrow on your date column, and select or deselect the '(Blanks)' option according to your merge requirements.
Save the filtered Excel file. Open Word, go to 'Mailings' > 'Select Recipients' > 'Use an Existing List', and connect to your saved Excel file. Word will now only import the visible, pre-filtered records.

Add Explicit 'AND' Conditions in the Merge Filter
Attempt to override the unwanted OR condition by manually forcing strict AND criteria for blank and non-blank fields inside Word.
Complete the Merge and Remove Unwanted Pages
If filtering logic fails entirely, perform the merge on all records and manually remove the incorrect pages from the final output.
Try WPS Office for Seamless Mail Merges and Document Editing
Struggling with Microsoft Word mail merge bugs? WPS Office provides a free, lightweight, and highly compatible alternative with robust mail merge tools and flawless support for Excel data sources.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your operating system.
- 2. Open Your Documents: Open your existing .docx mail merge template and .xlsx data source directly in WPS Office without losing any formatting.
- 3. Run Mail Merge: Navigate to the Mailings tab in WPS Writer to smoothly connect your data source and generate accurate merged documents.

Frequently Asked Questions
Why does Word keep changing my mail merge filter automatically?
Microsoft Word has known query expansion bugs when handling mail merge filters, particularly with blank or null values in date fields. It attempts to auto-correct the query but often misinterprets the logic, adding unwanted OR conditions instead.
Can I use an Access database instead of Excel to fix this filter issue?
Yes. Connecting your mail merge to a Microsoft Access database or running a SQL query through MS Query can often bypass Excel-specific filtering bugs in Word, giving you more precise control over blank and non-blank date fields.
How do I show blank dates in Word mail merge without causing errors?
Instead of filtering inside Word, the most reliable method is to format your Excel source data properly. You can use an IF formula in Excel to convert true blanks to a specific text string (like 'No Date' or 'Pending'), and then filter based on that exact text string in Word.




