Материал из VB Эксперт
Перейти к: навигация, поиск

Changing the View

"ppViewHandoutMaster, ppViewMasterThumbnails, ppViewNormal, ppViewNotesMaster, ppViewNotesPage, ppViewOutline, ppViewPrintPreview, ppViewSlide, ppViewSlideMaster, ppViewSlideSorter, ppViewThumbnails, or ppViewTitleMaster. 
Sub view()
End Sub

Get the Usable Height and Width

Sub GetActiveWindowUsableHeightWidth()
    MsgBox ActiveWindow.UsableHeight
    MsgBox ActiveWindow.UsableWidth
End Sub

Opening a New Window

Sub newWindow()
End Sub

Positioning and Sizing a Window: set its Left and Top properties

Sub pos()
    ActiveWindow.Left = 100
    ActiveWindow.Top = 200
End Sub

scrolls the active window up two screens

Sub scroll()
    ActiveWindow.LargeScroll Up:=2
End Sub

Splitting a Window 70 percent of the way down the window:

Sub split()
    With ActiveWindow
        .Split = True
        .SplitVertical = 70
    End With
End Sub

To display the Document Map for a window at the Document Map"s previous width percentage (of the document"s window), set the DocumentMap property to True:

Sub map()
    ActiveWindow.DocumentMap = True
End Sub

Toggle Gridlines

Sub ToggleGridlines()
    ActiveWindow.DisplayGridlines = Not ActiveWindow.DisplayGridlines
End Sub

Toggle Headings

Sub ToggleHeadings()
    ActiveWindow.DisplayHeadings = Not ActiveWindow.DisplayHeadings
End Sub

To remove the split from the window, set the Split property to False:

Sub remove()
    ActiveWindow.Split = False
End Sub

To size a window, set its Height and Width properties:

Sub size()
    With ActiveWindow
        .Height = 300
        .width = 400
    End With
End Sub

Working with Panes

Sub pane()
    With ActiveWindow
        .ViewType = ppViewSlide
    End With
End Sub

Zooms the active window to 150 percent:

Sub zoom()
    ActiveWindow.View.Zoom = 150
End Sub