#1
|
|||
|
|||
Making a macro run for each page in a mailmerge
Hello,
Bit of a newb here, so apologies if this is a dumb question. I've set up a mailmerge, and its all working fine, but part of the document is a table. I've flattened my data, so that I have fields for row1, row2 etc, but what I would like to do is hide the rows in the table if they are not populated. I've written a macro which removes the borders of each row of the table, if the cells aren't populated, but I'm struggling to make it call. I want it to run after each page of the mailmerge is created but before the document is sent to print. Googling the problem brings up a lot of people trying to run a mailmerge from a macro, but I can't find many people trying to run a macro from a mailmerge Is this possible? |
#2
|
||||
|
||||
Hi bakhesh,
Unless your macro runs the whole mailmerge process, it's not going to intercept the print function. One alternative is to use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version). 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. For some worked examples, see the attachments to the posts at: https://www.msofficeforums.com/mail-...html#post23345 https://www.msofficeforums.com/mail-...html#post30327 Another alternative is to use one of the Many-to-One Mail Merge add-ins, from: Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or Doug Robbins at https://skydrive.live.com/?cid=5aedc...615E886B%21566
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mailmerge to Email with a mailmerge attachment | Baldeagle | Mail Merge | 8 | 02-11-2013 04:40 AM |
Need help making a macro to space images | brewsta | Word VBA | 3 | 12-11-2012 03:29 PM |
Making Tables Copied from Excel Fit to Page | joatmon | Word | 1 | 05-30-2012 08:47 AM |
Mailmerge to Email with a mailmerge attachment | Baldeagle | Mail Merge | 13 | 05-29-2012 02:04 PM |
Making items (text, pictures, etc.) static on page | Jeremiahts | Word | 3 | 04-07-2011 09:54 PM |