Show AllShow All

StoryType Property

Returns the story type for the specified range, selection, or bookmark. Read-only WdStoryType.

expression.StoryType

expression    Required. An expression that returns one of the objects in the Applies To list.

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
		

This example selects the bookmark named "temp" if the bookmark is contained in the main story of the active document.

If ActiveDocument.Bookmarks.Exists("temp") = True Then
    Set myBookmark = ActiveDocument.Bookmarks("temp")
    If myBookmark.StoryType = wdMainTextStory _
        Then myBookmark.Select
End If
		
©2003 Microsoft Corporation. All rights reserved.