DocumentBuilderInsertCheckBox Method (String, Boolean, Int32)
Inserts a checkbox form field at the current position.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 20.1
public FormField InsertCheckBox(
	string name,
	bool checkedValue,
	int size


Type: SystemString
The name of the form field. Can be an empty string. The value longer than 20 characters will be truncated.
Type: SystemBoolean
Checked status of the checkbox form field.
Type: SystemInt32
Specifies the size of the checkbox in points. Specify 0 for MS Word to calculate the size of the checkbox automatically.

Return Value

Type: FormField
The form field node that was just inserted.

If you specify a name for the form field, then a bookmark is automatically created with the same name.

Shows how to insert checkboxes to the document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertCheckBox(string.Empty, false, false, 0);
builder.InsertCheckBox("CheckBox_Default", true, true, 50);
builder.InsertCheckBox("CheckBox_OnlyCheckedValue", true, 100);
See Also