If you right click the document a context sensitive menu will appear with an Expand/Collapse dropdown which lets you select Expand All Headings.
You can also find the command 'Expand All Headings' to add to the Quick Access Toolbar.
If you wanted it as a VBA command it would be
Code:
ActiveWindow.View.ExpandAllHeadings