Class Pane (Word VBA)
The class Pane represents a window pane. The Pane object is a member of the Panes collection. The Panes collection includes all the window panes for a single window.
To use a Pane class variable it first needs to be instantiated, for example
Dim pan as Pane Set pan = ActiveWindow.ActivePane
Here is an example of processing the Pane items in a collection.
For Each pan In Windows(1).Panes pan.View.ShowAll = True Next pan
Some procedures in this class have been grouped together in themes and are described on separate theme pages
These are the main methods of the Pane class
Activate - Activates the specified pane.
Close - Closes the specified Mail Merge data source, pane, or task.
Panes.Add - Returns a Pane object that represents a new pane to a window.
Dim pan As Pane Set pan = ActiveWindow.Panes.Add()
LargeScroll - Scrolls a window or pane by the specified number of screens.
SmallScroll - Scrolls a window by the specified number of lines.
BrowseWidth returns the width (in points) of the area in which text wraps in the specified pane.
Dim lngBrowseWidth As Long lngBrowseWidth = ActiveWindow.ActivePane.BrowseWidth
Document returns a Document object associated with the specified pane.
Dim docDocument As Document Set docDocument = ActiveWindow.ActivePane.Document
Frameset returns a Frameset object that represents an entire frames page or a single frame on a frames page.
Dim frmFrameset As Frameset Set frmFrameset = ActiveWindow.ActivePane.Frameset
HorizontalPercentScrolled returns or sets the horizontal scroll position as a percentage of the document width.
Index returns a Long that represents the position of an item in a collection.
Dim lngIndex As Long lngIndex = ActiveWindow.ActivePane.Index
MinimumFontSize returns or sets the minimum font size (in points) displayed for the specified pane.
Next returns a Pane object that represents the next document pane in the collection.
Dim panNext As Pane Set panNext = ActiveWindow.ActivePane.Next
Parent returns an object that represents the parent object of the specified Pane object.
Dim objParent As Object Set objParent = ActiveWindow.ActivePane.Parent
Previous returns a Pane object that represents the previous document pane in the collection.
Dim panPrevious As Pane Set panPrevious = ActiveWindow.ActivePane.Previous
Selection returns the Selection object that represents a selection or the insertion point within a document pane.
Dim slcSelection As Selection Set slcSelection = ActiveWindow.ActivePane.Selection
VerticalPercentScrolled returns or sets the vertical scroll position as a percentage of the document length.
View returns a View object that represents the view for the specified pane.
Dim vwView As View Set vwView = ActiveWindow.ActivePane.View
Zooms returns a Zooms collection that represents the magnification options for each view (such as normal view, outline view or print layout view).
Dim zmsZooms As Zooms Set zmsZooms = ActiveWindow.ActivePane.Zooms
Panes.Count returns a Long that represents the number of panes in the collection.
Dim lngCount As Long lngCount = ActiveWindow.Panes.Count
Panes.Parent returns an object that represents the parent object of the specified Panes object.
Dim objParent As Object Set objParent = ActiveWindow.Panes.Parent