File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Word-document/Delete-specific-content/Delete-specific-content Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 77 using ( WordDocument document = new WordDocument ( inputFileStream , FormatType . Docx ) )
88 {
99 // Deletes content from the 2nd to the 6th index in the text body of the Word document.
10- DeleteContentInWordDocument ( 2 , 6 , document ) ;
10+ DeleteSpecificContent ( 2 , 6 , document ) ;
1111 using ( FileStream outputFileStream = new FileStream ( Path . GetFullPath ( @"Output/Result.docx" ) , FileMode . Create , FileAccess . ReadWrite ) )
1212 {
1313 // Saves the modified Word document to the output file stream.
1919/// <summary>
2020/// Deletes content from the specified start index to the end index within the text body of the Word document.
2121/// </summary>
22- void DeleteContentInWordDocument ( int startIndex , int endIndex , WordDocument document )
22+ void DeleteSpecificContent ( int startIndex , int endIndex , WordDocument document )
2323{
2424 // Retrieves the text body of the last section in the Word document.
2525 WTextBody body = document . LastSection . Body ;
You can’t perform that action at this time.
0 commit comments