The code sample below shows how to insert a checkbox:ĭocumentPosition currentPosition = ĭ.CheckBox checkBox = (currentPosition) ĬheckBox.SizeMode = CheckBoxSizeMode.Auto ĬheckBox.HelpTextType = FormFieldTextType.Custom ĭim currentPosition As DocumentPosition = ĭim checkBox As .CheckBox = (currentPosition)ĬheckBox.SizeMode = CheckBoxSizeMode.AutoĬheckBox.HelpTextType = FormFieldTextType.Custom Specifies whether to update the checkbox’s value on exit. Otherwise, the help text is not displayed. With the …TextType property set to FormFieldTextType.Auto, make sure that the …Text property value is equal to one of the document’s AutoText gallery entries(stored as the Normal.dotm file in the system’s Templates folder). Gets or sets the checkbox’s instructional text.
![word insert checkbox word insert checkbox](https://i.ytimg.com/vi/oNyzzqeI62o/maxresdefault.jpg)
This text can be displayed in the status bar or when focusing the checkbox and pressing F1. Specifies the instructional text type that accompanies the checkbox. Set the CheckBox.SizeMode to CheckBoxSizeMode.Exact to use this property. Specifies the exact size of the check box. Use the property to specify the exact size. When you set this property to CheckBoxSizeMode.Auto the check box is resized according to the current font size value (returned by the CharacterPropertiesBase.FontSize property). Specifies a bookmark name associated with the checkbox.ĭefines the checkbox’s size mode. An FormFieldIncorrectSubDocumentException occurs on attempt to insert the checkbox into a comment, header, footer or text box.
![word insert checkbox word insert checkbox](https://resources.cimaware.com/img/expert-zone/archive_gregmaxey1_clip_image004.jpg)
Note that you can only insert checkboxes in the main document body. Inserts a checkbox form field to a given document position and adds the created CheckBox object to the FormFieldCollection. Use members from the table below to insert a checkbox in code. The resulting document can be exported to PDF or HTML format. These form fields are interactive, so users can toggle their state as needed. The RichEditDocumentServer allows you to view and export a document containing checkbox form fields.