Document Editing Problems

How to Fix Word Mail Merge Filters Adding Unwanted OR Conditions

Natalie TaylorNatalie Taylor Nov 10, 2026 869 views

Question details

The user needs to prevent Word mail merge filters from automatically adding unintended OR conditions when filtering an Excel data source.

How to Fix Word Mail Merge Filters Adding Unwanted OR Conditions
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 you start

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.

Solution 1Recommended

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.

1
Open Excel

Open the Excel data source file that you intend to use for your mail merge.

2
Apply Filters

Select your header row, navigate to the 'Data' tab on the ribbon, and click 'Filter'.

3
Filter Date Fields

Click the filter dropdown arrow on your date column, and select or deselect the '(Blanks)' option according to your merge requirements.

4
Save and Connect

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.

Pre-filter the Data Source in Excel
Filter Reliability: Filtering directly in Excel completely avoids Word's internal query expansion bugs, ensuring your merge uses exactly the records you intend.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your operating system.
  2. 2. Open Your Documents: Open your existing .docx mail merge template and .xlsx data source directly in WPS Office without losing any formatting.
  3. 3. Run Mail Merge: Navigate to the Mailings tab in WPS Writer to smoothly connect your data source and generate accurate merged documents.
Fully compatible with Microsoft Word (.docx) and Excel (.xlsx) formats.Built-in reliable Mail Merge tools without query expansion bugs.Lightweight software with a familiar, easy-to-use interface.Completely free core features for everyday document processing.
microsoft office alternative - wps office

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.