View Single Post
 
Old 01-22-2014, 08:36 PM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Windows XP Office 2007
Competent Performer
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default

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?
Reply With Quote