Panes Collection Object

Description

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.

ActiveWindow.Split = True
For Each aPane In ActiveWindow.Panes
    aPane.DisplayRulers = False
Next aPane
Use the Add method or the Split property to add a window pane. The following example splits the active window at 20 percent of the current window size.

ActiveWindow.Panes.Add SplitVertical:=20
The following example splits the active window in half.

ActiveWindow.Split = True
You can use the SplitSpecial property to show comments, footnotes, or endnotes in a separate pane.

Remarks

A window has more than one pane if it's split, or if the active view isn't page 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.

ActiveWindow.View.Type = wdNormalView
If ActiveDocument.Footnotes.Count >= 1 Then
    ActiveWindow.View.SplitSpecial = wdPaneFootnotes
    response = MsgBox("Do you want to close the footnotes pane?", vbYesNo)
    If response = vbYes Then ActiveWindow.ActivePane.Close
End If
Properties

Application property, Count property, Creator property, Parent property.

Methods

Add method (Panes collection), Item method.