选择书签属性 (Word)Selection.Bookmarks property (Word)

返回一个**书签** 集合, 该集合代表文档、区域或选定内容中的所有书签。Returns a Bookmarks collection that represents all the bookmarks in a document, range, or selection. 此为只读属性。Read-only.

语法Syntax

expressionexpression. Bookmarks

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

备注Remarks

有关返回集合中单个成员的信息, 请参阅返回集合中的对象For information about returning a single member of a collection, see Returning an object from a collection.

示例Example

本示例将选定内容中用第一个书签标记的文本区域的格式设置为加粗。This example applies bold formatting to the first range of bookmarked text in the selection.

If Selection.Bookmarks.Count >= 1 Then 
 Selection.Bookmarks(1).Range.Bold = True 
End If

另请参阅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.