dimanche 6 décembre 2015

Word CheckBox ContentContol OnChange Event

I try to make a word document with two checkboxes where each checkbox will show/hide a part of the document with a custom style.

I plan to set value Style.Font.Hidden = True/False depending from checkbox values, but...

I found that there are 3 types of controls:

  • Legacy Control - This seems old the ugly.

  • ActiveX Controls - I can easyly attach to checkbox onChange events, but these are also ugly and I think it's not that secure, also this is probably now working on mac.

  • ContentControls - This seems like the right way to do this, but I just can't attach to the right event. (Also there is some XML attachment described, but I'm not using this, this seem too complicated, I don't know.)

Can you tell me how to atach to onChange event of CheckBox ContentContol? I need the same behaviour like it's ActiveX CheckBox.

Aucun commentaire:

Enregistrer un commentaire