I have code that will save a mail merge as individual documents (below). I want to modify my code so that it will find all the templates in a folder and perform multiple mail merges, one for each template. I'm trying to go through my record list, sort each record into the appropriate "bin" based on the "form" field, and then run each mail merge based on the appropriate bin.
Example:
Have Template1.docm (for Form A) & Template2.docm (for Form B)
Records:
1 Form A Info1
2 Form A Info2
3 Form B Info3
4 Form A Info4
5 Form B Info5
Output:
3 Form A letters using Info1, Info2, and Info4 with Template1
2 Form B letters using Info3 and Info5 with Template2
The part I'm stuck at now is how to sort the record #s into arrays so that I have
records(1,1) = 1
records(1,2) = 2
records(1,3) = 5
records(2,1) = 3
records(2,2) = 4
How many of each form I have could change. Ideally, I also want my program not to have to know how many different forms there are when it starts.
Thanks for your help
My working Mail Merge code:
Please Login or Register to view this content.
Bookmarks