Skip to content

Commit b97341c

Browse files
addressed the feedbacks
1 parent 2cf880d commit b97341c

File tree

1 file changed

+2
-3
lines changed
  • Find-and-Replace/Add-line-break-after-replace-text/.NET/Add-line-break-after-replace-text

1 file changed

+2
-3
lines changed

Find-and-Replace/Add-line-break-after-replace-text/.NET/Add-line-break-after-replace-text/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using Syncfusion.DocIO;
22
using Syncfusion.DocIO.DLS;
33

4-
//Opens the template document with read/write access and shared read permission.
54
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
65
{
7-
//Opens an existing Word document.
6+
//Opens the template Word document.
87
using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Automatic))
98
{
109
//Finds the first occurrence of a particular text in the document.
@@ -21,7 +20,7 @@
2120
Break lineBreak = new Break(document, BreakType.LineBreak);
2221
//Insert line break in specific index.
2322
ownerPara.ChildEntities.Insert(index + 1, lineBreak);
24-
//Creates the output file with read/write access.
23+
//Creates file stream.
2524
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
2625
{
2726
//Saves the Word document to file stream.

0 commit comments

Comments
 (0)