File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Content-Controls/Add-tick-mark-checkbox/Add-tick-mark-checkbox Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2222 // Gets the last paragraph.
2323 WParagraph paragraph = document . LastParagraph ;
2424 // Add text to the paragraph.
25- document . LastParagraph . AppendText ( "Gender:\t Female " ) ;
25+ paragraph . AppendText ( "Gender:\t Female " ) ;
2626 // Append checkbox content control to the paragraph for the "checked" option.
27- IInlineContentControl checkedCheckBox = document . LastParagraph . AppendInlineContentControl ( ContentControlType . CheckBox ) ;
27+ IInlineContentControl checkedCheckBox = paragraph . AppendInlineContentControl ( ContentControlType . CheckBox ) ;
2828 // Set the checked state of the checkbox content control to display the tick symbol when selected
2929 checkedCheckBox . ContentControlProperties . CheckedState = tickState ;
3030 // Set the unchecked state of the checkbox content control to display an empty box when not selected
3535 // Gets the last paragraph.
3636 paragraph = document . LastParagraph ;
3737 // Add text to the paragraph.
38- document . LastParagraph . AppendText ( "\t Male " ) ;
38+ paragraph . AppendText ( "\t Male " ) ;
3939 // Append checkbox content control to the paragraph for the "unchecked" option.
40- IInlineContentControl uncheckedCheckBox = document . LastParagraph . AppendInlineContentControl ( ContentControlType . CheckBox ) ;
40+ IInlineContentControl uncheckedCheckBox = paragraph . AppendInlineContentControl ( ContentControlType . CheckBox ) ;
4141 // Set the checked and unchecked states.
4242 uncheckedCheckBox . ContentControlProperties . CheckedState = tickState ;
4343 uncheckedCheckBox . ContentControlProperties . UncheckedState = unTickState ;
You can’t perform that action at this time.
0 commit comments