Share via


Range.WholeStory Method

Word Developer Reference

Expands a range to include the entire story.

Syntax

expression.WholeStory

expression   Required. A variable that represents a Range object.

Remarks

The following instructions, where myRange is a valid Range object, are functionally equivalent:

Visual Basic for Applications
  myRange.WholeStory
myRange.Expand Unit:=wdStory

Example

This example expands myRange to include the entire story and then applies the Arial font to the range.

Visual Basic for Applications
  Set myRange = Selection.Range
myRange.WholeStory
myRange.Font.Name = "Arial"

This example expands myRange to include the entire comments story (wdCommentsStory) and then copies the comments into a new document.

Visual Basic for Applications
  If ActiveDocument.Comments.Count >= 1 Then
    Set myRange = Activedocument.Comments(1).Range
    myRange.WholeStory
    myRange.Copy
    Documents.Add.Content.Paste
End If

See Also