In examples.Sample Outline 1, position the cursor on "Summit 2" and then execute:
op.subsExpanded ()
» true
Now execute these lines:
op.collapse ();
op.subsExpanded ()
» false
The current heading's subheads are all collapsed.
In examples.Sample Outline 2, position the cursor on the Level 6 head, "Subhead 1.1.1.1.1," and execute:
op.subsExpanded ()
» false
This subhead has no subheads.