Table of contents
TOC
折叠目录
展开目录

使用窗格和视图Work with Panes and Views

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

更改当前视图Changing the Active View

可以返回或设置当前视图,包括图像属性与当前文档窗口中。本示例更改活动文档窗口,幻灯片视图中的视图。You can return or set the current view in the active document window with the ViewType property. This example changes the view in the active document window to slide view.

ActiveWindow.ViewType = ppViewSlide

更改普通视图中的窗格Changing Panes in Normal View

在普通视图中,您可以使用活动窗格中对象包括图像属性返回活动窗格。包括图像属性返回下面常数,确定活动窗格中的一个: ppViewNotesPageppViewOutlineppViewSlide。其他所有视图都都只有一个窗格并包括图像属性返回与活动文档窗口的相同常数值。In normal view, you can use the ViewType property with the active Pane object to return the active pane. The ViewType property returns one of the following PpViewType constants, identifying the active pane: ppViewNotesPage, ppViewOutline, or ppViewSlide. All other views have only one pane and the ViewType property returns the same PpViewType constant value as the active document window.

可以通过设置包括图像或通过使用Activate方法激活一个窗格。本示例返回包括图像属性来标识活动视图和活动窗格中的值。如果当前视图是普通视图且当前窗格是备注窗格,则使用Activate方法激活幻灯片窗格。You can activate a pane by setting the ViewType property or by using the Activate method. This example returns the value of the ViewType property to identify the active view and active pane. If the active view is normal view and the active pane is the notes pane, then the slide pane is activated with the Activate method.

With ActiveWindow
    If .ViewType = ppViewNormal and _
            .ActivePane.ViewType = ppViewNotesPage Then
        .Panes(2).Activate
    End If
End With

调整窗格大小Resizing panes

可以使用SplitHorizontalSplitVertical属性来调整窗格分隔线的位置在普通视图中可用的文档窗口的指定的百分比。调整分隔线两边窗格的大小。这些属性的最大值,由于幻灯片窗格具有取决于 10%比例的最小大小通常小于 100%。本示例设置幻灯片窗格占可用文档窗口高度的百分比为 65%,剩下的 35%为注释窗格。You can use the SplitHorizontal and the SplitVertical properties to reposition the pane dividers in normal view to the specified percentage of the available document window. This resizes the panes on either side of the divider. The maximum value of these properties is always less than 100% because the slide pane has a minimum size that depends on a 10% zoom level. This example sets the percentage of the available document window height that the slide pane occupies to 65 percent, leaving the notes pane at 35 percent.

ActiveWindow.SplitVertical = 65
© 2018 Microsoft