Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2016, 11:21 PM
AusSteelMan AusSteelMan is offline Filter Mail Merge based on a list of filter criteria Windows 7 64bit Filter Mail Merge based on a list of filter criteria Office 2010 64bit
Novice
Filter Mail Merge based on a list of filter criteria
 
Join Date: May 2016
Location: Wollongong, NSW, Australia
Posts: 2
AusSteelMan is on a distinguished road
Default Filter Mail Merge based on a list of filter criteria

Hi everybody,

Is there a way (I'm guessing VBA probably) that will:

1. filter my records for a mail merge output
2. print (to PDF) (ideally naming the file to my convention, sourced from another column in the filter list perhaps)
3. proceed to the first step again with the next filter criteria



A little background/more detail:
I am using mail merge to view Excel records (rows) in a "one-page" easy to read layout for a spare parts review process (using excel on a projector screen when it is DJ cols wide and 15,000 rows is painful to say the least).
I am currently producing short reports based on a few fixed criteria (eg. "Value" greater than $500, "Plant" area)
The third filter "Planner Group" changes for each report. I have to produce over 200 reports so doing it one-at-a-time is very time consuming (and potentially error prone of course)

What I'd like to happen:
I have a list of all the "Planner Group" codes I wish to use (in Excel of course).
I'd like to (presumably by VBA macro) to filter the data on the fixed criteria then by the Planner Group code, merge to PDF print and give it a file name of my choosing. Ideally this name would be on the filter source list (or by any sequential filename (I'll rename with existing know-how) or manually during the merge process if I have to)

Many thanks in advance for any help you could suggest (even just for reading too).

Best regards,
Darren
Reply With Quote
  #2  
Old 05-09-2016, 02:05 AM
macropod's Avatar
macropod macropod is offline Filter Mail Merge based on a list of filter criteria Windows 7 64bit Filter Mail Merge based on a list of filter criteria Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-09-2016, 03:35 PM
AusSteelMan AusSteelMan is offline Filter Mail Merge based on a list of filter criteria Windows 7 64bit Filter Mail Merge based on a list of filter criteria Office 2010 64bit
Novice
Filter Mail Merge based on a list of filter criteria
 
Join Date: May 2016
Location: Wollongong, NSW, Australia
Posts: 2
AusSteelMan is on a distinguished road
Default

Thanks Paul.

I have had a quick look and it seems to answer what I need. I'll work through it and see if I can get it to work.

Cheers,
Darren
Reply With Quote
Reply

Tags
filter, filtering, vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter tasks with multiple criteria markhad Outlook 0 03-15-2016 02:48 AM
Filter Mail Merge based on a list of filter criteria Complex Mail Merge based on Criteria fairchance Mail Merge 11 08-22-2015 04:32 AM
Mail merge with filter using data inputted by user Tornado70 Mail Merge 6 04-09-2013 07:16 AM
Forgotten Sort and Filter Criteria rbdmg Mail Merge 0 10-31-2011 09:14 PM
Filter Mail Merge based on a list of filter criteria Applying Filter to mail merge crashes word!!! sedain121 Mail Merge 1 06-28-2010 02:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft