File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Content-Controls/Add-tick-mark-checkbox/Add-tick-mark-checkbox Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 3232 // Set the initial state of the "Female" checkbox to checked
3333 checkedCheckBox . ContentControlProperties . IsChecked = true ;
3434
35- // Gets the last paragraph.
36- paragraph = document . LastParagraph ;
3735 // Add text to the paragraph.
3836 paragraph . AppendText ( "\t Male " ) ;
3937 // Append checkbox content control to the paragraph for the "unchecked" option.
4543 uncheckedCheckBox . ContentControlProperties . IsChecked = false ;
4644
4745 // Save the document.
48- using ( FileStream outputStream1 = new FileStream ( Path . GetFullPath ( @"Output/Result.docx" ) , FileMode . OpenOrCreate , FileAccess . ReadWrite ) )
46+ using ( FileStream outputStream = new FileStream ( Path . GetFullPath ( @"Output/Result.docx" ) , FileMode . OpenOrCreate , FileAccess . ReadWrite ) )
4947 {
50- document . Save ( outputStream1 , FormatType . Docx ) ;
48+ document . Save ( outputStream , FormatType . Docx ) ;
5149 }
5250}
You can’t perform that action at this time.
0 commit comments