WholeStory Method

Microsoft Word Visual Basic

Expands a range or selection to include the entire story.

expression.WholeStory

expression    Required. An expression that returns a Range or Selection object.

Remarks

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

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.

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.

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