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

返回指定的所选内容的文字部分类型。Returns the story type for the specified selection. 只读的WdStoryTypeRead-only WdStoryType.

语法Syntax

expression.expression. StoryType

_表达式_是必需的。expression Required. 表示 Selection 对象的变量。A variable that represents a Selection object.

示例Example

本示例返回选定内容的文章类型。This example returns the story type of the selection.

story = Selection.StoryType

当选定内容位于文档脚注的文章时,本示例关闭脚注窗格。This example closes the footnote pane if the selection is contained in the footnote story.

ActiveDocument.ActiveWindow.View.Type = wdNormalView 
If Selection.StoryType = wdFootnotesStory Then _ 
 ActiveDocument.ActiveWindow.ActivePane.Close

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