Is there any way to update check box value dynamically

Hi,

Currently we are using below version of Aspose.
Implementation-Title: Aspose.Words for Java
Implementation-Version: 10.4.0.0
Implementation-Vendor: Aspose Pty Ltd
Release-Date: 2011.08.30

We would like to know, is there any way to update the existing check box values dynamically?

Our scenario is like,
We have a word document which contains multiple editable check boxes. We would like to update the check box dynamically based on some flag values (Values comes from some resultset).
We have tried by setting up [EditGoTo.Destination=“Checkbox1”] and [editbookmark.name=“Checkbox1”]. But its replacing the check box/adding values next to check box.

Also, i gone throught the below thread, which is for creating new check box instead of bookmark.

Please let us know, how to update the check box values dynamically.

I have attached the document, which explains the process.

Hi Mohanraj,

Thanks for your inquiry. Sure, you can update the checked status of the check box form field by using the FormField.Checked property. Please try run the following code:

NodeCollection fields = doc.GetChildNodes(NodeType.FormField, true);
foreach(FormField field in fields)
{
    if (field.Type == FieldType.FieldFormCheckBox)
        field.Checked = true;
}

I hope, this helps.

Best regards,

Hi,

Thanks for you quick reply. I can able to achieve this now… Thanks again…

Hi,

Thanks for your feedback. It’s great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,

A post was merged into an existing topic: How to read and update the check box in ms word for java

A post was split to a new topic: Updating check box value dynamically in Word document