BookmarkCollection Class
A collection of Bookmark objects that represent the bookmarks in the specified range.
Inheritance Hierarchy
SystemObject
  Aspose.WordsBookmarkCollection

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
Syntax
public class BookmarkCollection : IEnumerable<Bookmark>, 
	IEnumerable

The BookmarkCollection type exposes the following members.

Properties
Methods
  NameDescription
Public methodCode exampleClear
Removes all bookmarks from this collection and from the document.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodCode exampleGetEnumerator
Returns an enumerator object.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodCode exampleRemove(String)
Removes a bookmark with the specified name.
Public methodCode exampleRemove(Bookmark)
Removes the specified bookmark from the document.
Public methodCode exampleRemoveAt
Removes a bookmark at the specified index.
Public methodToString (Inherited from Object.)
Examples
Shows how to obtain bookmarks from a bookmark collection.
Document doc = new Document(MyDir + "Bookmarks.doc");

// By index.
Bookmark bookmark1 = doc.Range.Bookmarks[0];

// By name.
Bookmark bookmark2 = doc.Range.Bookmarks["Bookmark2"];
See Also