I use the following script to collapse headings in Outline View in Word. I assign it to the keyboard shortcut Ctrl+Cmd+- and Ctrl+Cmd+Numpad-. If there are open headings below the selection in outline view then it will collapse the heading. Otherwise it will endeavour to collapse the cursor into the parent heading.
Use at own risk. I haven’t checked it too much.