I'm having a really hard time figuring this one out...
I'm trying to use a mail merge to create a document that has a single first page, and then one or more second pages.
This is my example (i work for the judiciary)
I have a one-page letter, cover sheet that is generated for each defendant. It is a letter to a defendant stating that they are scheduled for court.
Then after this first page, there could be one OR more "second" pages. i.e., there is a one-page court order that is generated for EACH DIFFERENT case that they have in our system.
Merge data spreadsheet (which is probably not set up right) looks something like this...
Name | Address | Phone | Case # |
Joe Smith | 111 Street Ave | 555-555-5555 | 11111-001 |
Joe Smith | 111 Street Ave | 555-555-5555 | 22222-002 |
Joe Smith | 111 Street Ave | 555-555-5555 | 33333-003 |
Jane Doe | 222 Ave Road | 666-666-6666 | 99999-009 |
Jane Doe | 222 Ave Road | 666-666-6666 | 88888-008 |
Rick Williams | 333 court drive | 777-777-7777 | 00000-000 |
The Excel sheet (outlined above), is auto-filled with a macro. So the user isn't populating it manually. It is grabbed from a different system...but i assume that is irrelevant to the question.
This table is a little bit dumbed down...there are a lot more fields. But this is the general result that I'm looking for...
(Cover Letter Sheet)
Joe Smith
111 Street Ave
555-555-5555
(new page (first court order))
Case # 11111-001
(new page (court order for next case))
Case # 22222-002
(new page (court order for next case))
Case # 33333-003
(new page (for next def's cover letter))
Jane Doe
222 Ave Road
666-666-6666
(new page(first court order))
Case # 99999-009
(new page (court order for next case))
Case # 88888-008
(new page (for next def's cover letter))
Rick Williams
333 Court Drive
777-777-77777
(new page (for def's court order))
Case #: 00000-00
At first I was running a macro that stored both the cover letter and court order in autotext entries (this is how i've accomplished this type of problem before). So, the macro inserted the cover letter autoext entry for the first person, fills in the address, etc. Then loop through each case, inserting an order, filling in the case number, etc., for each case that they have. Wash, rinse and repeat. However this is a royal pain as trying to use section breaks, etc. in this situation is a nightmare. It just never seems to follow the section break rules that i set up for it. So i thought that a mail merge would be faster and much cleaner. The second page(s) (court order) is a very complicated table...it has many many rows, columns, and lots of merge fields. I tried looking into using headers, different first page, etc., doing nested mail merge, but neither seemed to help me solve my problem.
Any advice is greatly appreciated.
Is this something that can be done? I'm pretty familiar with VBA, so using code to do this wouldn't be a problem..