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

If I want to read document replacement text, do I use this component?

If I want to read document replacement text, do I use this component?

Can the checkbox in the table be read?





1 Reply

AA Akash Arul Syncfusion Team November 21, 2022 11:41 AM

Regarding -  If I want to read document replacement text, do I use this component?
We suspect that your requirement is to read the replaced text in the document. You can find the required text using DocIO by using the Find API.

Please refer the below UG link to know more about Find and Replace
https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace

Please refer the below GitHub link to find the word and do the required formatting
https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Find-and-Replace/Find-and-highlight-all

You can find the required text and replace the text with needed text and then find the replaced text with the Find API. If we misunderstood your requirement kindly share the requirement more clearly which will helpful to provide you the appropriate solution at the earliest

Regarding -  Can the checkbox in the table be read?
Yes, you can read the checkbox inside the table. To meet this requirement, we suggest you iterate the Word document and then iterate into the table, and find the block content control or inline content control and then check whether its content control properties type is Checkbox.

Please refer our UG documentation link to know more about check box content control in Word document,
https://help.syncfusion.com/file-formats/docio/working-with-content-controls#check-box

Please refer our UG documentation link to know how to iterate through the Word document,
https://help.syncfusion.com/file-formats/docio/word-document/iterating-word-document-elements

We have prepared a sample of iterating the document and access the checkbox. Please find the sample attached here.
Note : The input document(Checkbox_Input.docx) and output document(Checkbox_output.docx) is inside the Data folder.


Attachment: Checkbox_28703d9c.zip

Loader.
Live Chat Icon For mobile
Up arrow icon