I did some more testing including a macro recording:
Code:
' ActiveWindow.ActivePane.View.Type = wdOutlineView
' ActiveWindow.View.ShowHeading 1
' ActiveWindow.View.ShowHeading 2
' ActiveWindow.View.ShowHeading 9
' ActiveWindow.View.ShowAllHeadings
' If ActiveWindow.View.SplitSpecial = wdPaneNone Then
' ActiveWindow.ActivePane.View.Type = wdNormalView
' Else
' ActiveWindow.View.Type = wdNormalView
' End If
The recorded code has the extra test for what I assume is a split pane. I tried to test my macro with a split pane, but didn't seem to have that option enabled. After a bit of poking around, I discovered that split pane is not available if the Document Map is open (sigh). Do the MSFT engineers lie awake at night thinking about ways to make special cases in their code?
In any case, after I was able to split the screen, my macro seems to work properly in either pane. Do I need to worry about that extra test?