Syntax
CountBookmarks()
Remarks
Returns the number of bookmarks in the active document. As the first example in this entry demonstrates, you can use this function to define an array containing every bookmark in a document.
Examples
This example creates an array containing the name of every bookmark in the active document:
size = CountBookmarks() - 1 Dim marks$(size) For count = 0 To size marks$(count) = BookmarkName$(count + 1) Next
The following example deletes all the bookmarks in the active document:
For n = 1 To CountBookmarks() EditBookmark .Name = BookmarkName$(CountBookmarks()), \ .Delete Next
See Also
BookmarkName$(), EditBookmark