Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2014, 06:32 PM
texas791 texas791 is offline Save merged document as concatenated merge field values Windows 7 32bit Save merged document as concatenated merge field values Office 2007
Novice
Save merged document as concatenated merge field values
 
Join Date: Feb 2014
Posts: 3
texas791 is on a distinguished road
Default Save merged document as concatenated merge field values

Hi everyone,



Newb with his first posted question.
I have a merge main doc that connects to a data source. The merge completes correctly. My question is: can I use vba to save the merged document with a file name that consists of the concatenation of several merge field values. The recipient list is set to just one record at a time to avoid having to split the merge in order to save each doc with its own file name. Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 02-24-2014, 07:03 PM
macropod's Avatar
macropod macropod is offline Save merged document as concatenated merge field values Windows 7 32bit Save merged document as concatenated merge field values Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,761
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

For some code to get you started, see: http://www.mrexcel.com/forum/general...ml#post3710126

Note: Once the merge has been executed, there are no mergefields to query, so doing this retrospectively would require quite a different approach.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 02-24-2014, 07:48 PM
texas791 texas791 is offline Save merged document as concatenated merge field values Windows 7 32bit Save merged document as concatenated merge field values Office 2007
Novice
Save merged document as concatenated merge field values
 
Join Date: Feb 2014
Posts: 3
texas791 is on a distinguished road
Default

Thank you for the quick reply. I will try adapting your code to my specific problem tomorrow, at work.

For strFolder can I just use the path to the desktop? and not use the GetFolder()?

Also, how do I code or do I need all these parameters?
ExportFormat:= what do I use for docx?
BitmapMissingFonts:=True
UseISO19005_1:=False

I just want to save the merged document as .docx

Thanks for the help.
Reply With Quote
  #4  
Old 02-24-2014, 07:55 PM
macropod's Avatar
macropod macropod is offline Save merged document as concatenated merge field values Windows 7 32bit Save merged document as concatenated merge field values Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,761
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

Yes, you could specify a particular path for strFolder, instead of using the results of GetFolder.

You can't use the ExportAs FixedFormat method for Word files; instead you need the SaveAs2 method. For an implementation that uses both a designated path and saving the output as Word files, see post #22 in the link.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 02-25-2014, 07:35 PM
texas791 texas791 is offline Save merged document as concatenated merge field values Windows 7 32bit Save merged document as concatenated merge field values Office 2007
Novice
Save merged document as concatenated merge field values
 
Join Date: Feb 2014
Posts: 3
texas791 is on a distinguished road
Default

Thanks, Macropod. Works great!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing - merged document, multiple sections nikkifox Word 2 04-09-2013 12:54 AM
Save merged document as concatenated merge field values How to line up a merged field to a column heading j_Southern Mail Merge 2 10-08-2012 12:28 PM
Formatting Merged Time Values Between Excel & Word JennEx Mail Merge 1 07-12-2012 02:54 PM
Save merged document as concatenated merge field values Saving merged document as separate files blankblank Mail Merge 1 05-11-2012 03:36 PM
Continuous page numbering in a merged document dkeinath Mail Merge 0 07-30-2010 09:30 AM


All times are GMT -7. The time now is 06:08 AM.


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