Try the attached. For your template, you will require all of the included code instead of what you now have for your 'TabbedCensus1790To1940Macro' and 'LockDD1' macros. I've also commented-out the .ExitMacro = "UnlinkFields" line in the code for testing purposes (plus that macro isn't in the code I'm returning).
As you will see, a complete re-write of your code was required. The code should now give you a good idea of how to use macros for conditional text & formfield insertion at nominated bookmarks. Note, too, that I've eliminated all of your IF fields. Given the need to conditionally insert multiple formfields, it didn't make sense having some of the processing done that way and the balance via macro coding when the latter handles the lot quite seamlessly.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|