As said i wanted to iterate over the nodes contained inside a specific bookmark and remove only those that are either paragraphs or table rows.
How can i proceed ?
Thanks in advance.
As said i wanted to iterate over the nodes contained inside a specific bookmark and remove only those that are either paragraphs or table rows.
How can i proceed ?
Thanks in advance.
@aaronArchest the way to get the content inside a bookmark is retrieve content between BookmarkStart
and BookmarkEnd
you can use ExtractContent method from this article
Bookmark bookmark = srcDoc.Range.Bookmarks["BookmarkName"];
// Get node that contains BookmarkStart and BookmarkEnd
Node startParentNode = bookmark.BookmarkStart.ParentNode;
Node endParentNode = bookmark.BookmarkEnd.ParentNode;
ExtractContent(startParentNode, endParentNode);
thank you very much !