Range.BookmarkID property (Word)
Returns the number of the bookmark that encloses the beginning of the specified range; returns 0 (zero) if there is no corresponding bookmark. Read-only Long.
Syntax
expression. BookmarkID
expression A variable that represents a Range object.
Remarks
The number or the bookmark corresponds to the position of the bookmark in the document: 1 for the first bookmark, 2 for the second one, and so on.
Example
This example adds a bookmark named "temp" at the beginning of the document if there is not already a bookmark set for that location.
Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseStart
If myRange.BookmarkID = 0 Then
ActiveDocument.Bookmarks.Add Name:="temp", Range:=myRange
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin