Instead of filtering by Planner Group code, you could have the mailmerge sort by it (and by other criteria as well), so that your outputs are grouped the way you want them. If you use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version), you can have it insert page breaks (or Section breaks) whenever the groupings change. No code required. To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://windowssecrets.com/forums/sho...merge-Tutorial
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.
Having completed said merge, it's a simple-enough matter to saving the different portions of the file to uniquely-named PDFs. There's code for that in the
Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum:
https://www.msofficeforums.com/mail-...ps-tricks.html