Skip to content

Commit ac7c2ac

Browse files
ES-263734-Comments modified
1 parent 09bbcdc commit ac7c2ac

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • Bookmarks/Rename-bookmark/.NET/Rename-bookmark

Bookmarks/Rename-bookmark/.NET/Rename-bookmark/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ private static void ReplaceBookmarkName(WordDocument document, string existingBo
3737
// No bookmark found, return immediately
3838
if (bookmark == null)
3939
return;
40-
//Variable for store index of bookmark start and end
40+
// Variables to store the index positions of the bookmark start and end within their respective owners
4141
int startIndex = -1;
4242
int endIndex = -1;
43-
// Creating new bookmark with the replacement name
43+
// Create new bookmark start and end markers with the replacement name
4444
BookmarkStart newBookmarkStart = new BookmarkStart(document, replaceBookmarkName);
4545
BookmarkEnd newBookmarkEnd = new BookmarkEnd(document, replaceBookmarkName);
4646

@@ -66,7 +66,7 @@ private static void ReplaceBookmarkName(WordDocument document, string existingBo
6666
startICC.ParagraphItems.Insert(startIndex, newBookmarkStart);
6767
}
6868
// Determine the owner and index for the bookmark end.
69-
// Similar to start, the end could be in a paragraph or inline content contro
69+
// Similar to start, the end could be in a paragraph or inline content control.
7070
if (bookmark.BookmarkEnd != null && bookmark.BookmarkEnd.Owner is WParagraph)
7171
{
7272
WParagraph endParagraph = bookmark.BookmarkEnd.Owner as WParagraph;

0 commit comments

Comments
 (0)