The following macro should set all checkbox content controls in a documents body with the property of 'no delete. An entire table and more can be a range of text. Multiple cells (but not a complete row) cannot be a range of text. Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. One or more contiguous rows can be a range of text. Word Object Model Reference Support and feedback (Start:=0,End:=0), Type:=wdFieldFormCheckBox) Currently, only rich text, plain text, and checkbox content controls are supported.
Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. The following example adds a check box at the beginning of the active document, sets the name to "Color", and then selects the check box. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Use the Add method with the FormFields object to add a check box form field. Set ffield = ActiveDocument.FormFields(1).CheckBox The following example determines whether the ffield object is valid before changing the check box size to 14 points. If ActiveDocument.FormFields(1).Type = wdFieldFormCheckBox ThenĪctiveDocument.FormFields(1).CheckBox.Value = True The following example checks the type of the first form field if it is a check box, the check box is selected. The index number represents the position of the form field in the FormFields collection. Utilisez un contrôle CheckBox pour donner à l’utilisateur le choix entre deux valeurs telles que Oui/Non, Vrai/Faux ou Désactivé/. ActiveDocument.FormFields("Check1").CheckBox.Value = True Check Box Content Control and Drop-Down List Content Control are not supported either in the Word Online or Microsoft Teams.
The following example selects the check box form field named "Check1" in the active document. Sorry for the inconvenience caused by the problem. Use the CheckBox property with the FormField object to return a CheckBox object. Use FormFields (Index), where Index is index number or the bookmark name associated with the check box, to return a single FormField object. Represents a single check box form field.