BookmarkCollectionRemoveAt Method |
Namespace: Aspose.Words
// Open a document with 3 bookmarks: "MyBookmark1", "My_Bookmark2", "MyBookmark3" Document doc = new Document(MyDir + "Bookmarks.docx"); // Remove a particular bookmark from the document Bookmark bookmark = doc.Range.Bookmarks[0]; doc.Range.Bookmarks.Remove(bookmark); // Remove a bookmark by specified name doc.Range.Bookmarks.Remove("My_Bookmark2"); // Remove a bookmark at the specified index doc.Range.Bookmarks.RemoveAt(0);