FORMCHECKBOX field code doesn't render checkbox

Connor Shore 186 Reputation points
2024-05-09T15:38:05.5166667+00:00

I have a word document that contains a FORMCHECKBOX field code I can view by hitting ALT-F9, however when I toggle it to not show the field code, there is no checkbox that appears in its place. Why is this? In our software we insert a checkbox when we see this field code, however for some reason in this template there is no checkbox despite the field code. Any indication to why this is the case would be greatly appreciated.

Here is a download link to the file: https://windwardstudios.box.com/s/5ufo3vit5xi8zil678e14x2kuvh6peaf

Thank you in advance!

Microsoft 365 and Office Open Specifications
Microsoft 365 and Office Install, redeem, activate For business Windows
{count} votes

Accepted answer
  1. John Korchok 6,126 Reputation points
    2024-05-10T17:57:36.13+00:00

    You code added most of the XML for a checkbox, but left out the formfield options that tell Word what kind of formfield it is. Your XML:

    <w:fldChar w:fldCharType="begin"/>
    

    Corrected XML:

    <w:fldChar w:fldCharType="begin">
    	<w:ffData>
    		<w:name w:val="Check1"/>
    		<w:enabled/>
    		<w:calcOnExit w:val="0"/>
    		<w:checkBox>
    			<w:sizeAuto/>
    			<w:default w:val="0"/>
    		</w:checkBox>
    	</w:ffData>
    </w:fldChar>
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.