For simple cases when only some part of the paragraphtext is bookmarked you can just set the Bookmark.Text property to an empty string (“”). For complex cases please check the source code example given in the end of the following article:
It seems like the example works with different bookmarks as well. Just modify the beginning as follows:
private void RemoveBookmarkWithContent(Bookmark startBookmark, Bookmark endBookmark)
{
// We need to store other bookmark nodes here, to move them away from the removed area.
Hashtable bookmarkNames = new Hashtable();
Hashtable bookmarkStarts = new Hashtable();
Hashtable bookmarkEnds = new Hashtable();
ArrayList nodesToRemove = new ArrayList();
BookmarkStart bookmarkStart = startBookmark.BookmarkStart;
BookmarkEnd bookmarkEnd = endBookmark.BookmarkEnd;
....
Please tell me if you succeed to implement the task.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.