Word Merge to generate 1 address label page but multiple/separate invoice pages

starl

Administrator
Joined
Aug 16, 2002
Messages
6,091
Office Version
  1. 365
Platform
  1. Windows
I'm helping someone out with this, I don't have any real data or template. And I'm terrible at Word merges. I've looked online and haven't found a solution. So I'm trying to think outside the box.
Have a bunch of records. Some of those records belong to the same person. Want to do a mail merge where pages 1 & 2 (front & back) are an address label and the rest of the pages are the invoices each record represents. Some people only one invoice, so their print out would be
Page 1/2: Address Label
Page 3/4: Invoice

But some people have multiple invoices, so their print out would be:
Page 1/2: Address Label
Page 3/4: Invoice A
Page 5/6: Invoice B

I thought an If/then, but that's only for including specific text, not merge fields.
I thought if I blanked out the Address Label merge fields in the data set, it would skip generating the Address Label, but I get a blank page.
I'd like to compare the mergefield of the current record with the previous or store a variable from the previous record, but that doesn't seem possible.

Is there a way to do this with Word's built-in Word Merge logic? The solution is limited to that - I can already do a VBA solution.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You can 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:
Microsoft Word Catalogue/Directory Mailmerge Tutorial
or:
http://www.gmayor.com/Zips/Catalogue Mailmerge.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.

Depending on what you're trying to achieve, the field coding for this can be complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
mail merge with duplicate names but different dollar amounts
Access to Word, Creating a list from multiple records

Although the tutorial is written around the idea that grouped records would be output to the same page, there is no fundamental reason why they can't be output to separate pages.
 
Upvote 0
You can 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:
Microsoft Word Catalogue/Directory Mailmerge Tutorial
or:
http://www.gmayor.com/Zips/Catalogue Mailmerge.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.

Depending on what you're trying to achieve, the field coding for this can be complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
mail merge with duplicate names but different dollar amounts
Access to Word, Creating a list from multiple records

Although the tutorial is written around the idea that grouped records would be output to the same page, there is no fundamental reason why they can't be output to separate pages.
:) Hi @Macropod - was hoping you'd see this! I'll be checking this out and will get back to you. I had seen some references to using Directory, but the examples were nothing like what I needed, so didn't seem relevant. -thanks!
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top