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.

Class Window gives access to class Pane.


Dim pan as Pane
Set pan = ActiveWindow.ActivePane

For Each

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

Methods

Activate - Activates the specified pane.

AutoScroll - Scrolls automatically through the specified pane.

Close - Closes the specified Mail Merge data source, pane, or task.

LargeScroll - Scrolls a window or pane by the specified number of screens.

NewFrameset - Creates a new frames page based on the specified pane.

PageScroll - Scrolls through the specified window page by page.

SmallScroll - Scrolls a window by the specified number of lines.

TOCInFrameset - Creates a table of contents based on the specified document and puts it in a new frame on the left side of the frames page.

Properties

BrowseWidth returns the width (in points) of the area in which text wraps in the specified pane.

DisplayRulers true if rulers are displayed for the specified pane.

DisplayVerticalRuler true if a vertical ruler is displayed for the specified pane.

Document returns a Document object associated with the specified pane.

Frameset returns a Frameset object that represents an entire frames page or a single frame on a frames page.

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.

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.

Pages returns a Pages collection that represents the pages in a document.

Previous returns a Pane object that represents the previous document pane in the collection.

Selection returns the Selection object that represents a selection or the insertion point within a document pane.

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.

Zooms returns a Zooms collection that represents the magnification options for each view (such as normal view, outline view or print layout view).

Document - Represents a document. The Document object is a member of the Documents collection. The Documents collection contains all the Document objects that are currently open in Word.

Frameset - Represents an entire frames page or a single frame on a frames page.

Pages - A collection of pages in a document. Use the Pages collection and the related objects and properties for programmatically defining page layout in a document.

Selection - Represents the current selection in a window or pane. A selection represents either a selected (or highlighted) area in the document, or it represents the insertion point if nothing in the document is selected. There can be only one Selection object per document window pane, and only one Selection object in the entire application can be active.

View - Contains the view attributes (such as show all, field shading, and table gridlines) for a window or pane.

Zooms - A collection of Zoom objects that represents the magnification options for each view (such as outline, normal, or print layout).