问题
I create a mail merge with word automation. In my template file I have checkboxes which are set to checked or unchecked state through the following code:
{IF {MERGEFIELD fieldName}="y" [checked checkbox] [unchecked checkbox]}
where [checked checkbox] and [unchecked checkbox] are Check Box Content Controls
with the corresponding check-state.
This works fine so far. However in the output document of the mail merge, the checkboxes are no more checkable. It seems that the Check Box Content Control will be removed and only the representing symbol will be left in the output document.
Is there the possibility to add a checkbox that is checked based on a value of the data source but still is checkable/uncheckable in the merged document?
I also have tried with legacy Forms and Active X Controls, however I had no success.
回答1:
Status
I have tried a lot of things with few/no success. It seems as I described: Through the merging process, the Content Control will be replaced through the representating symbol and I have not found to change this behaviour.
Workaround
What I have done in the end, is to make a post-process operation that replaces all instances of a specific placeholder in the destination document through a new Content Control Checkbox. The state is taken from the placeholder (there are two different placeholders, one for each state).
An extended version of the operation could also look for the inserted symbols of the mail merge operation, I have disclaimed to implement this.
Conclusion
The solution works fine and eventually also the creation of the templates is more simple. However it feels to me very clumsy and if someone has a better approach, please post it here.
I someone is interested in the replacement code, I have postet here a question about (with) it.
回答2:
Yes, the check box can still be checked or unchecked by clicking on the "Finish & Merge" -> "Edit Individual Documents" because the mailmerge fields are converted back to text, control or object (eg. checkbox option control).
This solves my check box problems.
Thanks,
来源:https://stackoverflow.com/questions/9502792/state-of-checkbox-can-no-more-be-checked-after-mail-merge