• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1231
  • Last Modified:

setting formcheckbox values during mailmerge

I have a mail merge template which contains formcheckboxes.  I want to be able to alter the checked/unchecked value of these checkboxes depending on the value of a merge field.

I see the formchecbox has a bookmark propery and I have one called check1, its this value I've been trying to manipulate.  But I can't get the right syntax.

I've been trying with something like this, but can't get it to work:

{IF {MERGEFIELD ISTRUE} = "VALID" {SET Check1 "TRUE"} {SET Check1 "FALSE"}}

Am I close? Is there a better way to get the value of a checkbox to update on the fly?

thanks.
 
0
jozniff
Asked:
jozniff
  • 4
  • 2
1 Solution
 
Joanne M. OrzechManager, Document Services CenterCommented:
Try this...although I'm not sure....worth a shot
{IF {MERGEFIELD ISTRUE} = "VALID" "{SET Check1 "TRUE"}" "{SET Check1 "FALSE"}"}

I use this code with VB:
ActiveDocument.FormFields("Check1").CheckBox.Value = True
0
 
Joanne M. OrzechManager, Document Services CenterCommented:
Are you using Excel as the data source?
0
 
jozniffAuthor Commented:
Yes,  I am using excel as the data source, however this is being generated on demand from an Oracle database so I would not be able to change the format or use macros etc on the excel side. Adding extra speech marks (") around the true false section does not work for me either.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Joanne M. OrzechManager, Document Services CenterCommented:
Do you have to use formfield checkboxes?  If not, you could just use Insert, Symbol and find one for a plain box and one for a checked box (under WingDings usually).

{IF {MERGEFIELD ISTRUE} = "VALID" "PlainBoxSymbolGoesHere" "CheckedBoxSymbolGoesHere"}"}

0
 
jozniffAuthor Commented:
Thanks.  the wingding workaround works well, but I'd still like to find a way of doing it with the bookmarks, so that users can use the resultant merged doc as a form still.  
0
 
Joanne M. OrzechManager, Document Services CenterCommented:
Well jozniff - you could try using the INCLUDETEXT field with a document with a blank formfield box and a document with a checked formfield box.  Other than that, I don't know off the top of my head.

I could try to play around with it at home and get back to you.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now