BookmarkCollectionClear Method

Removes all bookmarks from this collection and from the document.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void Clear()
Examples
Shows how to remove all bookmarks from a document.
// Open a document with 3 bookmarks: "MyBookmark1", "My_Bookmark2", "MyBookmark3"
Document doc = new Document(MyDir + "Bookmarks.docx");

// Remove all bookmarks from the document
// The bookmarked text is not deleted
doc.Range.Bookmarks.Clear();
See Also