BookmarkCollectionRemoveAt Method

Removes a bookmark at the specified index.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void RemoveAt(
	int index
)

Parameters

index
Type: SystemInt32
The zero-based index of the bookmark to remove.
Examples
Shows how to remove bookmarks from a document using different methods.
// 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);
See Also