StoryType Property
Applies To
Bookmark object, Range object, Selection object.
Description
Returns the story type for the specified range, selection, or bookmark. Can be one of the following WdStoryType constants: wdCommentsStory, wdEndnotesStory, wdEvenPagesFooterStory, wdEvenPagesHeaderStory, wdFirstPageFooterStory, wdFirstPageHeaderStory, wdFootnotesStory, wdMainTextStory, wdPrimaryFooterStory, wdPrimaryHeaderStory, or wdTextFrameStory. Read-only Long.
See Also
InRange method, InStory method, IsEqual method, NextStoryRange property, StoryLength property, StoryRanges property, WholeStory method.
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.
ActiveWindow.View.Type = wdNormalView
If Selection.StoryType = wdFootnotesStory Then _
ActiveWindow.ActivePane.Close
This example selects the bookmark named "temp" if the bookmark is contained in the main story in the active document.
If ActiveDocument.Bookmarks.Exists("temp") = True Then
Set myBookmark = ActiveDocument.Bookmarks("temp")
If myBookmark.StoryType = wdMainTextStory Then myBookmark.Select
End If