返回指定区域、所选内容或书签的文字部分类型。WdStoryType,只读。
WdStoryType 可以是下列 WdStoryType 常量之一: |
wdCommentsStory |
wdEndnotesStory |
wdEvenPagesFooterStory |
wdEvenPagesHeaderStory |
wdFirstPageFooterStory |
wdFirstPageHeaderStory |
wdFootnotesStory |
wdMainTextStory |
wdPrimaryFooterStory |
wdPrimaryHeaderStory |
wdTextFrameStory |
expression.StoryType
expression 必需。该表达式返回“应用于”列表中的一个对象。
本示例返回所选内容的文字部分类型。
story = Selection.StoryType
当所选内容位于文档脚注的文字部分时,本示例关闭脚注窗格。
ActiveDocument.ActiveWindow.View.Type = wdNormalView
If Selection.StoryType = wdFootnotesStory Then _
ActiveDocument.ActiveWindow.ActivePane.Close
如果活动文档中的主要文字部分包括名为“temp”的书签,本示例则选中该书签。
If ActiveDocument.Bookmarks.Exists("temp") = True Then
Set myBookmark = ActiveDocument.Bookmarks("temp")
If myBookmark.StoryType = wdMainTextStory _
Then myBookmark.Select
End If