다음을 통해 공유


Subdocuments.Expanded Property (Word)

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

Syntax

expression .Expanded

expression A variable that represents a Subdocument object.

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 switches the Expanded property between expanding all subdocuments in the active window 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

See Also

Concepts

Subdocuments Object Members

Subdocuments Collection Object