Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2018, 05:45 PM
macropod's Avatar
macropod macropod is offline Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Windows 7 64bit Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


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]
Reply With Quote
  #2  
Old 02-28-2018, 07:12 AM
meghanquint4 meghanquint4 is offline Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Windows 7 64bit Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Office 2010 64bit
Novice
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name
 
Join Date: Feb 2018
Posts: 2
meghanquint4 is on a distinguished road
Default

Thank you so much! The Send Mailmerge Output to Individual Files thread works perfectly! I was stuck on this for about 5 hours yesterday until I decided to post a thread. This helps me out a lot. Thank you again Macropad!
Reply With Quote
Reply

Tags
macro edit, mail merge fields, pdf save error

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name 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
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Merge separate words files into one master file. ronka1997 Word 3 08-09-2016 01:26 AM
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name 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
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Creating separate file for each mail merge doshshirl Mail Merge 3 02-15-2014 08:49 PM
Microsoft Word VBA to save Word doc to separate PDF files using a Mail Merge field as File name Word Mail Merge File Save mickeyw3340 Mail Merge 2 12-18-2012 11:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft