0

I am working on a Word Addin/Office JS Project which deals with Word templates. My requirement is to load the static table into template when the user clicks on the Addin.

Step 1: Converting Static Table Data into OOXML and Storing it into Database.

Sample Table Structure:Image1

enter image description here

This Table has Check box controls and Content Control inside it. I am generating OOXML for this loading it into database.

Code

var body = context.document.body;

var bodyOOXML = body.getOoxml();

Step 2: Retrieving the table data from Database and loading it in the document when the user click on the addin.

Code

 var body = context.document.body;

 body.insertOoxml(currentOOXML, Word.InsertLocation.replace);

but when I retrieving the table data, the check box control in the table are displayed as "?"

Please find the sample below

Sample Table Structure:

enter image description here

Can some one help me with this: I don’t understand why checkbox controls are getting converted as "?"

If I click on "?" its converting back into a Checkbox

8
  • Could you please tell us the Word UI commands that were used to create these checkboxes? There are at least four different possibilities and without knowing which one this is, it's not possible to research what the problem might be... That, or provide the Word Open XML that defines such a checkbox. Commented Nov 8, 2019 at 13:53
  • @CindyMeister Steps followed to create Checkbox control: Step 1: Open a word document. Step 2:Navigate to the Developers tab. Step 3:Click on check box control and control is getting added in the document Commented Nov 8, 2019 at 14:34
  • My research indicates that the behavior is probably due to the Unicode font not being recognized immediately. The Word Open XML reveals that a checkbox content control is Unicode 2610 / 2612 formatted with the font MS Gothic, which is "wrapped" in whichever font applied to the text, otherwise. There's code behind clicking the font symbol that switches between these two Unicode values.The Word Open XML: <w14:checkbox><w14:checked w14:val="0"/><w14:checkedState w14:val="2612" w14:font="MS Gothic"/><w14:uncheckedState w14:val="2610" w14:font="MS Gothic"/></w14:checkbox> Commented Nov 9, 2019 at 14:40
  • Note that this "code behind" is probably the reason @WenboShi writes that the control is not supported in Word Online. Commented Nov 9, 2019 at 14:41
  • You might try a form field (from the Legacy Tools in the same group where the checkbox content control is located) and see if that works any better for you... Commented Nov 9, 2019 at 14:43

1 Answer 1

1

check box control is not supported in Word Online. Only Rich Text Content Control is supported in Word Online.

Sign up to request clarification or add additional context in comments.

1 Comment

Wenbo Shi I tried the same in office 365 word desktop version still facing the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.