Syntax
BookmarkName$(Count)
Remarks
Returns the name of the bookmark specified by Count.
Argument | Explanation | |
Count | The number of the bookmark, from 1 to the total number of bookmarks defined for the active document (you can obtain the total using CountBookmarks()). The order of bookmark names is determined by the order of the bookmarks in the document. You must specify Count; otherwise, the function returns an error. For example, a$ = BookmarkName$() generates an error. |
Example
This example puts a list of every bookmark name in a document into the array mark$(). You could use this array to present a list of bookmark names in a dialog box. Note that the size of the array is one less than the number of bookmarks because the subscript for the first array element is 0 (zero), not 1.
numBookmarks = CountBookmarks() arraySize = numBookmarks - 1 Dim mark$(arraySize) For n = 0 To arraySize mark$(n) = BookmarkName$(n + 1) Next
See Also
CountBookmarks(), GetBookmark$()