Share via


TextRange.Story Property

Publisher Developer Reference

Returns a Story object that represents the story properties in a text range.

Syntax

expression.Story

expression   A variable that represents a TextRange object.

Example

This example returns the story in the selected text range and, if it is in a text frame, inserts text into the text range.

Visual Basic for Applications
  Sub AddTextToStory()
    With Selection.TextRange.Story
        If .HasTextFrame Then
            .TextRange.InsertAfter NewText:=vbLf & "This is a test."
        End If
    End With
End Sub

See Also