File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Paragraphs/Apply-indentation-for-import-content/.NET/Apply-indentation-for-import-content Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33
44
55//Open the existing main document.
6- FileStream fileStream1 = new FileStream ( @"Data/Main.docx" , FileMode . Open ) ;
6+ FileStream fileStream1 = new FileStream ( Path . GetFullPath ( @"Data/Main.docx" ) , FileMode . Open ) ;
77WordDocument mainDocument = new WordDocument ( fileStream1 , FormatType . Docx ) ;
88//Open the existing temporary document.
9- FileStream fileStream = new FileStream ( @"Data/REKOMENDASI.docx" , FileMode . Open ) ;
9+ FileStream fileStream = new FileStream ( Path . GetFullPath ( @"Data/REKOMENDASI.docx" ) , FileMode . Open ) ;
1010WordDocument tempDoc = new WordDocument ( fileStream , FormatType . Docx ) ;
1111//Set the first section break.
1212tempDoc . Sections [ 0 ] . BreakCode = SectionBreakCode . NoBreak ;
2525AddLeftIndentation ( mainDocument , secIndex , paraIndex + 1 , lastPara . ParagraphFormat . LeftIndent ) ;
2626
2727//Save the main document.
28- FileStream outputStream = new FileStream ( @"Output/Output_REKOMENDASI.docx" , FileMode . Create , FileAccess . Write ) ;
28+ FileStream outputStream = new FileStream ( Path . GetFullPath ( @"Output/Output_REKOMENDASI.docx" ) , FileMode . Create , FileAccess . Write ) ;
2929mainDocument . Save ( outputStream , FormatType . Docx ) ;
3030
3131
You can’t perform that action at this time.
0 commit comments