We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to check a checkbox in existing word doc template from WPF app

I am opening a word template using Syncfusion.DocIO.DLS and the use the .Replace method to replace some text on the form with proper data.  My template (Standard.docx) has some two checkboxes and I haven't figure out how to programmatically check the appropriate boxes.  

I am attaching an example of my WPF C# project that includes the template and am asking if you can give me direction as to how to check the and uncheck 


Attachment: LetterGeneratorDoc_d43fee0e.zip

2 Replies 1 reply marked as answer

LB Lokesh Baskar Syncfusion Team August 16, 2021 09:34 AM UTC

Hi Karla,

Thank you for contacting Syncfusion support.

From the given details, we have found that your requirement is check and uncheck the checkbox programmatically in the Word document. To achieve your requirement, we suggest you to enable the property Checked in WCheckBox as given below. 


 
checkbox.Checked = true; 

We have prepared the sample application to achieve your requirement. Please refer the sample from the below link.  
https://www.syncfusion.com/downloads/support/forum/168094/ze/DocIOSample-1642991686.zip

Please refer the UG documentation link to know more details.
https://help.syncfusion.com/file-formats/docio/working-with-form-fields#check-box

Please let us know if you have any other questions.

Regards,  
Lokesh B 


Marked as answer

KF Karla Franke August 16, 2021 04:02 PM UTC

Thank you 


Loader.
Up arrow icon