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.

Steve Greene
  • 12,029
  • 1
  • 33
  • 54

1 Answers1

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.

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
  • 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! – Steve Greene Dec 15 '15 at 17:33
  • 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 :-)! – Cindy Meister Dec 15 '15 at 17:41
  • If anyone looking for the demo https://www.youtube.com/watch?v=7vv1yofDwo4 – Shridhar Oct 09 '20 at 11:52