Document.ZoomBehavior property (Visio)
Determines the zoom behavior for a Microsoft Visio document or window. Read/write.
Syntax
expression.ZoomBehavior
expression A variable that represents a Document object.
Return value
VisZoomBehavior
Remarks
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 for ZoomBehavior.
Constant | Value | Description |
---|---|---|
visZoomNone | 0 | Undefined zoom behavior; use the zoom behavior of the document or application. This is the default. |
visZoomInPlaceContainer | 1 | The container performs the zoom. |
visZoomVisio | 2 | Visio performs the zoom. |
visZoomVisioExact | 4 | 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
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.
Example
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
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기