Forum Discussion

Carl_61's avatar
Carl_61
Iron Contributor
Jan 08, 2025

Word Mail Merge Filter Issue

Hello and thank you to all that can help me understand what if anything I am doing wrong here.

I am trying to mail merge a document using data in my excel file for the merge. The issue is I want to filter out records based on some filtering criteria.  With the document open I select "Edit Recipient List" and all the data pops into view. In the bottom section of the pop up there is the "Refine recipient list" with options of Sort, Filter, Find Duplicates, Find recipient & Validate addresses.  I select "Filter" and a pop up comes into view that says "Filter and Sort". In the "Filter Records" tab I click the down arrow under "Field" and select "Date BO Letter Sent 2025" which is a column header/label in the sheet. In the "Comparison" field I select "Is not blank". I then select "And" as the operator. In the "Field" box next to And I select "Actual Response Date 2025" then under "Comparison" I select "Is Blank".  Finally, I click "OK".  While looking at the "mail Merge Recipients" list the data now showing appears to have filtered.  The issue now is that when I click "OK", the data showing in the "Mail Merge Recipients" list is not the data showing for the document. I scroll thru the list on the screen and it not the filtered list I saw before clicking "OK".  When I go back to the "Edit Recipients List" icon and click it, the "Mail Merge Recipients" pop up appears and I click on filter. When the "Filter and Sort" pop up appears another criteria has been added "OR" "Actual Response Date 2025" "Is blank".  This keeps happening and I don't understand. As you can see, both Fields I am Filtering are Dates.  I am just trying to Filter out Records that show a BO Letter was sent and no response to the letter has been received.  The Filter and Sort pop up is adding additional criteria I am not asking for and messing up my results.  Again however, this mess up appears to only be happening when I click "OK" to return back the the document that will be merged.  I have selected some of the records like 1 thru 5 and documents are merging and printing but the ones I don't want are being included.  I did this to test the results of my Filter request.

Am I doing something wrong here???

To be clear, I am trying to Filter based on one field not being BLANK (Is not blank) "AND" the other Field being BLANK (Is Blank).  Its like the Filter is being lost when I click "OK" on the "Mail Merge Recipients" pop up to get back to the document to be merged.

Pulling my hair out, I need help please.

Thank you,

 

Carl

5 Replies

  • daggy's avatar
    daggy
    Copper Contributor

    And.. ok ... it turns out... filters don't work properly, known and ancient and never fixed bug. There's a reply from "A User" in this thread https://answers.microsoft.com/en-us/msoffice/forum/all/word-2016-mail-merge-filter-does-not-work/de1d0149-9ab1-467a-b5f3-64b7218fdd8a that explains the root of the evil is some broken query expansion behaviour. In my case I had a <string field> "not equal to" "something" clause and the broken expansion decided "ahhhh.. null (blank) is not equal to "something" so so it threw in an "or blank" clause... I added an AND <string field> "not blank" and it fixed it for my case, I'm not sure how to "fix" yours though... 

  • mathetes's avatar
    mathetes
    Silver Contributor

    Carl -- I'm going to just give you a work-around, rather than try to slog through that full description. Having just gone through using Mail Merge to create mailing labels for Christmas cards...one thing I did there (and I'm suggesting you do) is print to a file. You could just print to PDF and delete the pages you don't want. It's not a real solution, but it'll work if you don't have time to come up with the real solution.

    • Carl_61's avatar
      Carl_61
      Iron Contributor

      Thank you for your reply.  Sounds good. However, just trying to realize why the filter is producing the issue I am having.  Is Microsoft aware of this issue? Is this a known issue.  If so, what are they doing about it.  Blah, Blah, Blah........

      • daggy's avatar
        daggy
        Copper Contributor

        "Just delete the pages you don't want" is a fine suggestion... If one knew what pages (from thousands) one didn't want.. without using a filter expression (some of the field's I'm filtering on aren't even in the output document). My work around was to resort to creating a "filter" in excel (a sheet that somewhat painfully "filters" data from the sheet I would otherwise use). Its awful, and "contaminates" the workbook. Carl_61​ - I don't know what I've done differently today to have this problem, but I have other word docs filtering data from excel workbooks and they are working (and now I'm afraid to touch them) ... This one is being weird - and I don't know why..  Exactly the problem you describe ("OR" <a field in my data>  "is blank" ) clause added without my asking for it.

Resources