Skip to content

Commit 8b449af

Browse files
Addressed the feedbacks
1 parent 527cde3 commit 8b449af

File tree

1 file changed

+2
-0
lines changed
  • Bookmarks/Replace-bookmark-content-with-HTML/.NET/Replace-bookmark-content-with-HTML

1 file changed

+2
-0
lines changed

Bookmarks/Replace-bookmark-content-with-HTML/.NET/Replace-bookmark-content-with-HTML/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
bookmarkNavigator.MoveToBookmark("Index");
2525
//Replace the bookmark content with the converted HTML content.
2626
bookmarkNavigator.ReplaceContent(htmlDocumentPart);
27+
//Close htmlDocumentPart.
28+
htmlDocumentPart.Close();
2729
//Save the modified document to a specified file path in DOCX format.
2830
using (FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.docx"), FileMode.Create, FileAccess.Write))
2931
{

0 commit comments

Comments
 (0)