Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-02-2015, 10:00 PM
macropod's Avatar
macropod macropod is offline Mail Merge keeping VBA Macro Windows 7 64bit Mail Merge keeping VBA Macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

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]
Reply With Quote
 

Tags
mail merge, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge keeping VBA Macro Mail Merge Macro 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
Mail Merge keeping VBA Macro Word Doc Macro (mail Merge) ajolson1964 Word VBA 1 05-10-2011 10:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:16 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