View Single Post
 
Old 01-10-2018, 01:48 AM
plupton plupton is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2018
Posts: 2
plupton is on a distinguished road
Smile Send Mailmerge Output to Individual Files - Help with VBA

Hi, The post on MailMerge Tips and Tricks is really helpful and especially the Macro to send Merge output to Separate Files.
My application is to create invoices (separate pdf docs) from a master Excel file as the data source. I have got it to work fine where data source and main doc are in the same folder.

Would really appreciate some help with 2 issues:
1. It is better if the data source is in a separate folder - but with main doc and outputs in the same folder.
Need some help to amend code to accomodate this.

2. As the data source is a master file, I only want to merge selected records. Am using the 'Edit Recipient List' function to select only the required records. Also changed the macro name to MailMergeToDoc so can just click on 'Finish & Merge>Edit Individual Documents'. This works a treat and the merge docs are created fine, but the process ends with the attached error message

This happens at the .ActiveRecord = i line
Fine to just click the 'OK' button and continue, but would be nice to have a Message like 'Docs for your selected records are done' .

I am very new to VBA and have fiddled around without success. I would really appreciate some help with the code.
Thanks, Peter
Attached Images
File Type: jpg Merge Data Source Error.JPG (16.2 KB, 22 views)

Last edited by plupton; 01-10-2018 at 03:32 AM. Reason: Added 2nd issue
Reply With Quote