Skip to content

Commit cbf9df4

Browse files
Added getfullpath for left indent sample
1 parent bbb854a commit cbf9df4

File tree

1 file changed

+3
-3
lines changed
  • Paragraphs/Apply-indentation-for-import-content/.NET/Apply-indentation-for-import-content

1 file changed

+3
-3
lines changed

Paragraphs/Apply-indentation-for-import-content/.NET/Apply-indentation-for-import-content/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
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);
77
WordDocument 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);
1010
WordDocument tempDoc = new WordDocument(fileStream, FormatType.Docx);
1111
//Set the first section break.
1212
tempDoc.Sections[0].BreakCode = SectionBreakCode.NoBreak;
@@ -25,7 +25,7 @@
2525
AddLeftIndentation(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);
2929
mainDocument.Save(outputStream, FormatType.Docx);
3030

3131

0 commit comments

Comments
 (0)