![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#2
|
||||
|
||||
|
You can't retrieve a mergefield name from the output document. In any event, it would be more efficient to generate the individual output files as part of the merge process rather than doing it afterwards. For code to do that (and name the output files according to field names in the data source), see Send Mailmerge Output to Individual Files in the Mailmerge Tips and Tricks 'Sticky' thread at the top of the mailmerge forum:
https://www.msofficeforums.com/mail-...ps-tricks.html If you're wedded to the existing process, see Split Merged Output to Separate Documents in the same thread for pointers on how you might retrieve the desired filenames. PS: When posting code, please use the code tags, indicated by the # button on the posting menu. Without them, your code loses much of whatever structure it had.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| macro edit, mail merge fields, pdf save error |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Tweak Macro to Save Each Page of Word Document as Separate PDF or Doc File?
|
Hewg74 | Word VBA | 3 | 08-22-2016 05:20 PM |
Merge separate words files into one master file.
|
ronka1997 | Word | 3 | 08-09-2016 01:26 AM |
Mail merge result in separate world files instead of one file containing all the data
|
xdhbsh | Mail Merge | 3 | 12-24-2015 12:23 AM |
Creating separate file for each mail merge
|
doshshirl | Mail Merge | 3 | 02-15-2014 08:49 PM |
Word Mail Merge File Save
|
mickeyw3340 | Mail Merge | 2 | 12-18-2012 11:30 AM |