CollapseOutline Method Example
This example applies the Heading 2 style to the second paragraph in the active document, switches the active window to outline view, and collapses the text under the second paragraph in the document.
ActiveDocument.Paragraphs(2).Style = wdStyleHeading2
With ActiveDocument.ActiveWindow.View
.Type = wdOutlineView
.CollapseOutline Range:=ActiveDocument.Paragraphs(2).Range
End With
This example collapses every heading in the document by one level.
With ActiveDocument.ActiveWindow.View
.Type = wdOutlineView
.CollapseOutline Range:=ActiveDocument.Content
End With