PreviousBookmarkID 属性 (Word)Selection.PreviousBookmarkID property (Word)

返回指定的选定内容或范围; 中或之前的最后一个书签的编号如果没有相应的书签,则返回 0 (零)。Returns the number of the last bookmark that starts before or at the same place as the specified selection or range; returns 0 (zero) if there is no corresponding bookmark. 只读 LongRead-only Long.


expressionexpression. PreviousBookmarkID

_表达式_一个代表**Selection** 对象的变量。expression A variable that represents a Selection object.


本示例选定活动文档的前一个书签。This example selects the previous bookmark in the active document.

num = Selection.PreviousBookmarkID 
If num <> 0 Then ActiveDocument.Content.Bookmarks(num).Select

另请参阅See also

Selection 对象Selection Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.