![]() |
#1
|
|||
|
|||
![]()
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. |
#2
|
||||
|
||||
![]()
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 [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
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. |
#4
|
||||
|
||||
![]()
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 [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Thanks, Macropod. Works great!
|
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printing - merged document, multiple sections | nikkifox | Word | 2 | 04-09-2013 12:54 AM |
![]() |
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 |
![]() |
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 |