View Single Post
  #3   Report Post  
Greg Maxey
 
Posts: n/a
Default

Robert,

I won't swear to it, but I don't think you can without a bit of VBA. If you
use a DocVariable field instead of the if field for your conditional text,
have the check box "calculate on exit, and run a macro on exit from the
checkbox similar to the following example you should be set:

Sub CheckStat()
If ActiveDocument.FormFields("Check1").Result = True Then
ActiveDocument.Variables("Checkstat").Value = "Checked"
Else
ActiveDocument.Variables("Checkstat").Value = "Unchecked"
End If
End Sub

In place of the IF field use this field: { DOCVARIABLE "CheckStat" }

Variable name, macro name and bookmark names are of course up to you.

HTH
--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Robert Kleinschmidt wrote:
I want to use the Checked or Unchecked state of a FORMCHECKBOX to
control the display of text in a template. I can do this using a
FORMTEXT or FORMDROPDOWN field with a bookmark and "Calculate on
exit" selected.

With either FORMTEXT or FORMDROPDOWN I can write
{ IF {bookmark} = "X" text1 text2 }
and it works fine, but how do I do this with FORMCHECKBOX?