Muokkaa

Jaa


Window.CenterViewOnShape method (Visio)

Pans the Microsoft Visio drawing window to place the specified shape in the center of the view.

Syntax

expression. CenterViewOnShape( _SheetObject_ , _Flags_ )

expression A variable that represents a Window object.

Parameters

Name Required/Optional Data type Description
SheetObject Required Shape The shape to center in the view.
Flags Required VisCenterViewFlags The centering behavior to apply.

Return value

Nothing

Remarks

The Flags parameter value must be combination of one of more of the following VisCenterViewFlags constants.

Constant Value Description
visCenterViewDefault 0 Display the page that contains the specified shape and center the view on the shape.
visCenterViewIfOffScreen 1 Center the view only if the shape is currently off screen.
visCenterViewSelectShape 2 Also select the shape.

If the specified shape is not valid, Microsoft Visio returns an Invalid Parameter error.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.