Document.ZoomBehavior Property (Visio)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Determines the zoom behavior for a Microsoft Visio document or window. Read/write.

expression .ZoomBehavior

expression A variable that represents a Document object.

Return Value


To set the zoom behavior for all new documents and windows, use the DefaultZoomBehavior property.

The following constants declared by the Visio type library in VisZoomBehavior are valid values forZoomBehavior.






Undefined zoom behavior; use the zoom behavior of the document or application. This is the default.



The container performs the zoom.



Visio performs the zoom.



Visio zooms when open in place; Visio does not adjust the zoom level

If ZoomBehavior is set to visZoomVisio, Visio adjusts the zoom level to certain discrete values, for example 50% or 100%, to optimize the appearance of the page rulers and grid, and of snap behavior.

If ZoomBehavior is set to visZoomInPlaceContainer, Visio uses the container's IOleCommandTarget interface to perform the zoom and forces a fit-to-window zoom within the in-place window. If the container does not support IOleCommandTarget, no zooming occurs.

If ZoomBehavior is set to visZoomVisioExact, you can set the zoom to any value, either by using the Window.Zoom property or by using the Zoom slider in the Visio user interface.

Note Note

The default behavior (visZoomNone) is different from the behavior used in versions earlier than Visio 2002. (In Visio 2002, the default was visZoomVisio.) To replicate the behavior seen in earlier versions, set this value to visZoomInPlaceContainer.

The following procedure shows how to set the Document.ZoomBehavior property to the value that replicates Visio 2000 behavior.

Sub ZoomBehavior_Example() 
 ActiveDocument.ZoomBehavior = visZoomInPlaceContainer 
End Sub