Pane Interface

Represents a window pane. The Pane object is a member of the Panes collection. The [Panes#SameCHM] collection includes all the window panes for a single window.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
<GuidAttribute("00020960-0000-0000-C000-000000000046")> _
Public Interface Pane
'Usage
Dim instance As Pane
[GuidAttribute("00020960-0000-0000-C000-000000000046")]
public interface Pane

Remarks

Use Panes(Index), where Index is the index number, to return a single Pane object. The following example closes the active pane.

If ActiveDocument.ActiveWindow.Panes.Count >= 2 Then _ 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



    ActiveDocument.ActiveWindow.ActivePane.Close

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.

ActiveDocument.ActiveWindow.Panes.Add SplitVertical:=20

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 the window is split or the view is not print layout view and information such as footnotes or comments are displayed. The following example displays the comments pane in normal view and then prompts to close the pane.

ActiveDocument.ActiveWindow.View.Type = wdNormalView 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



If ActiveDocument.Comments.Count >= 1 Then 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



    ActiveDocument.ActiveWindow.View.SplitSpecial = wdPaneComments 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



    response = _ 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



        MsgBox("Do you want to close the comments pane?", vbYesNo) 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



    If response = vbYes Then _ 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



        ActiveDocument.ActiveWindow.ActivePane.Close 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 



End If

See Also

Reference

Pane Members

Microsoft.Office.Interop.Word Namespace