Expanded Property

Applies To

Subdocuments collection object.

Description

True if the subdocuments in the specified document are expanded. Read/write Boolean.

Example

This example expands all subdocuments in the active master document.

If ActiveDocument.Subdocuments.Count >= 1 Then
    ActiveDocument.Subdocuments.Expanded = True
End If
This example toggles the Expanded property between expanding and collapsing all subdocuments in the active document.

ActiveDocument.Subdocuments.Expanded = Not ActiveDocument.Subdocuments.Expanded
This example determines whether the subdocuments in Report.doc are expanded and then displays a message indicating their status.

If Documents("Report.doc").Subdocuments.Expanded = True Then
    MsgBox "All available information is displayed."
Else
    MsgBox "Expand subdocuments for more information."
End If