ScrollIntoView Method

Microsoft PowerPoint Visual Basic

Scrolls the document window so that items within a specified rectangular area are displayed in the document window or pane.

expression.ScrollIntoView(Left, Top, Width, Height, Start)

expression    Required. An expression that returns a DocumentWindow object.

Left    Required Long. The horizontal distance (in points) from the left edge of the document window to the rectangle.

Top    Required Long. The vertical distance (in points) from the top of the document window to the rectangle.

Width    Required Long. The width of the rectangle (in points).

Height    Required Long. The height of the rectangle (in points).

Start   Optional MsoTriState. Determines the starting position of the rectangle in relation to the document window.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse The bottom right of the rectangle is to appear at the bottom right of the document window.
msoTriStateMixed
msoTriStateToggle
msoTrue Default. The top left of the rectangle is to appear at the top left of the document window.

Remarks

If the bounding rectangle is larger than the document window, the Start argument specifies which end of the rectangle displays or gets initial focus. This method cannot be used with outline or slide sorter views.

Example

This example brings into view a 100x200 point area beginning 50 points from the left edge of the slide, and 20 points from the top of the slide. The top left corner of the rectangle is positioned at the top left corner of the active document window.

ActiveWindow.ScrollIntoView Left:=50, Top:=20, _
    Width:=100, Height:=200