title: How to run VBA script by clicking on ContentControl Checkbox in Word
body: <p>I'm trying to check all contentcontrol checkboxes by clicking contentcontrol checkbox. But how to set event to run this script by clicking on checkbox with Tag D1</p>
  
  <pre><code>If ActiveDocument.SelectContentControlsByTag("D1")(1).Checked = True Then
     ActiveDocument.SelectContentControlsByTag("D1_M1")(1).Checked = True
     ActiveDocument.SelectContentControlsByTag("D1_M2")(1).Checked = True
     ActiveDocument.SelectContentControlsByTag("D1_M3")(1).Checked = True
  End If
  If ActiveDocument.SelectContentControlsByTag("D1")(1).Checked = False Then
     ActiveDocument.SelectContentControlsByTag("D1_M1")(1).Checked = False
     ActiveDocument.SelectContentControlsByTag("D1_M2")(1).Checked = False
     ActiveDocument.SelectContentControlsByTag("D1_M3")(1).Checked = False
  End If
  </code></pre>