Mail merge with check box form field
Asked Answered
R

1

6

I am looking for a way to set a checkbox field to checked via a mail merge. I would like to avoid using a macro if possible. The document I was provided has a check box form field with a bookmark named "SUBMIT". Is there a way to pass in data (CSV file) that will cause the checkbox to be checked? Perhaps a data field named SUBMIT whose value is true, etc?

If that is not doable, I was considering just passing an "X" or some character that represents a check mark and overlaying the field.

Receiptor answered 15/12, 2015 at 15:50 Comment(0)
F
6

Yes, this should be doable using field codes. You can have an IF field display a font symbol or a graphic for True / False based on the content of a field in the mail merge data source.

For the sake of discussion, let's say the field name in the data source is "Submit". Insert a pair of field brackets by pressing Ctrl+F9 and create the IF field structure, inserting the MergeField from the mergefield list:

{ IF { MergeField "Submit" } = 0 "" "" }

Note that I'm checking for "false" because this value is predictably 0, while True might be 1 or -1.

Now position the cursor between the first pair of double-quotes and insert the "not checked" graphic or symbol. For example, you could use Word's Insert/Symbol dialog box to insert a WingDings box. Repeat for the "checked" box, using a checked symbol or graphic.

Alt+F9 to toggle the field codes back to display and test.

Fester answered 15/12, 2015 at 16:15 Comment(3)
Key line "inserting the MergeField from the mergefield list" as I learned the hard way you can't just type those brackets in. Working. Thanks!Receiptor
It's not the brackets so much - Ctrl+F9 always works - as the merge field name. Word can get finicky about that, especially if it contains spaces or special characters. It actually "likes" a wierd sort of reversed apostrophe that's difficult to find on the keyboard. So I like to play it safe :-)!Fester
If anyone looking for the demo youtube.com/watch?v=7vv1yofDwo4Adriell

© 2022 - 2024 — McMap. All rights reserved.