Bookmarks Interface
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Bookmarks Interface

A collection of Bookmark objects that represent the bookmarks in the specified selection, range, or document.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

public interface Bookmarks : IEnumerable

Use the Bookmarks property to return the Bookmarks collection.

Use the Add method to set a bookmark for a range in a document.

Use Bookmarks(index), where index is the bookmark name or index number, to return a single Bookmark object. You must exactly match the spelling (but not necessarily the capitalization) of the bookmark name.

The index number represents the position of the bookmark in the Selection or Range object. For the Document object, the index number represents the position of the bookmark in the alphabetic list of bookmarks in the Bookmarks dialog box (click Name to sort the list of bookmarks alphabetically).

The ShowHidden property affects the number of elements in the Bookmarks collection. If ShowHidden is True, hidden bookmarks are included in the Bookmarks collection.

© 2016 Microsoft