Selection.BookmarkID property (Word)
Returns the number of the bookmark that encloses the beginning of the specified selection. Read-only Long.
Syntax
expression. BookmarkID
expression A variable that represents a Selection object.
Remarks
Returns 0 (zero) if there is no corresponding bookmark. The number 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 displays the number of the bookmark that encloses the beginning of the selection.
MsgBox "Bookmark " & Selection.BookmarkID
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.
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk