Panes Collection Object
A collection of Pane objects that represent the window panes for a single window.
Using the Panes Collection
Use the Panes property to return the Panes collection. The following example splits the active window and hides the ruler for each pane.
ActiveDocument.ActiveWindow.Split = True For Each aPane In ActiveDocument.ActiveWindow.Panes aPane.DisplayRulers = False Next aPane
The following example splits the active window in half.
ActiveDocument.ActiveWindow.Split = True
You can use the SplitSpecial property to show comments, footnotes, or endnotes in a separate pane.
A window has more than one pane if it's split, or if the active view isn't print layout view and information such as footnotes or comments is displayed. The following example displays the footnote pane in normal view and then prompts the user to close the pane.
ActiveDocument.ActiveWindow.View.Type = wdNormalView If ActiveDocument.Footnotes.Count >= 1 Then ActiveDocument.ActiveWindow.View.SplitSpecial = wdPaneFootnotes response = _ MsgBox("Do you want to close the footnotes pane?", vbYesNo) If response = vbYes Then _ ActiveDocument.ActiveWindow.ActivePane.Close End If
Parent Objects | Window