所选内容。 Document 属性 (Word)Selection.Document property (Word)

返回一个**Document** 对象, 该对象与指定的选定内容相关联。Returns a Document object associated with the specified selection. 此为只读属性。Read-only.

语法Syntax

表达式文档expression.Document

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

示例Example

本示例显示选定内容所在的文档名称和路径。This example displays the document name and path for the selection.

Msgbox Selection.Document.FullName

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