![]() |
|
#1
|
||||
|
||||
![]()
Instead of trying to re-insert the formfields as each record is generated, via the MailMergeAfterRecordMerge event, you'd do better to wait until the merge has completed then re-insert the formfields for all records in a single pass - all you need is a placeholder for that, as the article in the link indicates.
As for values being lost, what you're doing suggests the formfields are not required after the merge - only their results. In that case, you could leave the formfields in the mailmerge main document but use a macro to convert them to their results before executing the merge. Just don't re-save the mailmerge main document after running the macro.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]() Quote:
Quote:
One other issue that has come up is how I am activating the macro. Once the document is protected for the form fields, the Macros are greyed out (and I didn't want to have the user run them through the menu anyway), so I tried a command button (which, unless I'm doing something wrong, only worked until the document was closed and reopened), and using a MacroButton hyperlink. This seems to work, but requires double-clicking the link to run. Plus, the first click shifts the page view which I find not user-friendly. Is there a better option to give the user a way to run the macro? Also, I want to reset all of the properties for those fields that are removed. From what I see, that article only creates a new form Field, and sets it's name and text. I need to set it's maximum length, as well as type (number/date/etc.). I don't see anywhere in the language help files that allows me to set these; they are either read only (Format, Type) or non-existant (Maximum Length). Edit: after some contemplation, I think the way to go might be to use the method in that article, but instead of creating a new form field, locate the form field in the original document, then copy it's range to the merged document. |
#3
|
||||
|
||||
![]()
Since you're using Office 2007, is there a reason for not using Content Controls instead of Formfields? You wouldn't have any of these issues with Content Controls - and the document doesn't even need to be protected for them to work. I know Office 2007 doesn't support checkbox Content Controls, but that can easily be worked around with a dropdown Content Control.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]() Quote:
These forms have gone through legal reviews, so they usually can't be redesigned. I have to recreate them as they originally were created, so I can't change the checkboxes. Thanks again for all of your assistance, I'm going to try to get through setting up the code today so I'll hopefully know if it is working the way I need it to soon, or if any other issues crop up that I wasn't anticipating. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
mdod | Word | 1 | 07-19-2013 06:33 PM |
Mail Merge Duplication of address on merge | RICKY | Mail Merge | 1 | 09-26-2012 03:14 PM |
![]() |
Aude | Mail Merge | 1 | 01-06-2012 07:38 PM |
![]() |
paulie_k | PowerPoint | 3 | 12-13-2011 09:21 AM |
![]() |
sedain121 | Mail Merge | 2 | 10-04-2011 07:52 PM |