Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 04-08-2013, 05:50 PM
macropod's Avatar
macropod macropod is offline Problems With MergeField Switches Windows 7 64bit Problems With MergeField Switches 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

Hi JennEx,



With your code, I take it you're using it in a different document to the one we've discussed previously. Your reference to "a workbook that doesn't exist" suggests you haven't defined (or, perhaps, populated) the StrSrc variable. Errors like this are easily trapped if you make it a rule to prefix all code modules with 'Option Explicit'.

Regarding the alternate 'SubResp' values, that could be done via an InputBox. You'd want some good validation with that, though, or the code will fail with all sorts of dialogs etc that will only confuse the user.

As for using the macro for fields in headers and footers, no, it's not really designed for that. But then, it's a simple matter to paste the 'text' code into the body of a document, convert it, then cut & paste the converted code into the header or footer.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Switches ilovemypuppy Word 2 02-08-2012 04:28 PM
Problems With MergeField Switches Index switches cksm4 Word VBA 2 02-03-2011 07:21 AM
Mail merge switches Jan Collier Mail Merge 0 08-29-2010 06:06 AM
Command Line Switches Ringmaster Office 0 08-10-2010 06:27 AM
Help with switches: Word mail merge with Excel ks_ Mail Merge 0 12-09-2009 05:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:03 AM.


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