![]() |
#2
|
||||
|
||||
![]()
Word has no setting that would enable a mailmerge main document's VBA code automatically to be added to the output documents; it has to be done post-merge. That can be done manually or programmatically (but that becomes a potential problem if the code to do so is in the module you want to export, since the export code also gets exported).
However, there may be some more fundamental problems you will need to address. You refer to using the code to "change text based on what has been selected". That suggests you're either using field coding or bookmarks to manage the text changes. Neither of these is likely to survive the mailmerge (some fields do, but those that do probably don't offer the scope for what you're trying to achieve). Is there a reason your option selections can't be made part of the mailmerge (e.g. via field coding that tests various fields in the datasource, or use FILLIN or ASK fields as either the first record or each record is processed)?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
mail merge, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ch1325 | Word VBA | 2 | 06-08-2015 06:18 AM |
Mail Merge Macro | spc94 | Word VBA | 2 | 06-04-2015 07:06 AM |
Help Please: New VBA user trying to use a macro to split Mail Merge documents. Two Run-Time Error | zipit189 | Word VBA | 7 | 03-18-2015 01:13 PM |
Macro to loop through all cells in a table produced by a mail merge | elh52 | Word VBA | 4 | 08-31-2014 10:50 PM |
![]() |
ajolson1964 | Word VBA | 1 | 05-10-2011 10:15 PM |