Relative Content

Tag Archive for excelvbams-wordmailmerge

VBA and mail merge to pdf all instances saving in each pdf

I feel like I am 90% of the way there, the code opens my word document, correctly sets the data source, completes the mail merge and even names the PDFs correctly by name and path. However each PDF has all three (using limited data for testing) instances/data sets saved to it, so there are three letters in each PDF each mail merged to each recipient. ie Record 1 generates PDF names it Joe Bloggs Letter.pdf, open the PDF and it has a letter for Joe Bloggs, Jane Doe (record 2), and John Smith (record 3). It then generates Record 2, named correctly but again all three letters inside.

VBA and mail merge to pdf all instances saving in each pdf

I feel like I am 90% of the way there, the code opens my word document, correctly sets the data source, completes the mail merge and even names the PDFs correctly by name and path. However each PDF has all three (using limited data for testing) instances/data sets saved to it, so there are three letters in each PDF each mail merged to each recipient. ie Record 1 generates PDF names it Joe Bloggs Letter.pdf, open the PDF and it has a letter for Joe Bloggs, Jane Doe (record 2), and John Smith (record 3). It then generates Record 2, named correctly but again all three letters inside.