Previous Document Next Document

Object Model Reference : Classes : A : ActiveView : Methods : ActiveView.ToFitArea


ActiveView.ToFitArea

Sub ToFitArea(Left As Double, Top As Double, Right As Double, Bottom As Double)

Description

Member of ActiveView

The ToFitArea method changes the active view to fit a specified rectangular area, identified by its coordinates, in the current document into the application window. The ToFitArea method defines an area, and adjusts the zoom level of the page so that the defined region fills the current view in the application window.

Parameter
Description
Left
A coordinate that specifies the left side of the rectangle of the active view relative to the center of the coordinates set for the document. The left coordinate is measured in document units.
Top
A coordinate that specifies the top side of the rectangle of the active view relative to the center of the coordinates set for the document. The top coordinate is measured in document units.
Right
A coordinate that specifies the right side of the rectangle of the active view relative to the center of the coordinates set for the document. The right coordinate is measured in document units.
Bottom
A coordinate that specifies the bottom side of the rectangle of the active view relative to the center of the coordinates set for the document. The bottom coordinate is measured in document units.

VBA example

The following VBA example creates a rectangular area in the active document. This defined area, using the coordinates 0, 0, 5, and 5, uses the ToFitArea method to adjust the zoom level to display the newly defined rectangular page area as the active view.

Sub ToFitArea()
 ActiveWindow.ActiveView.ToFitArea 0, 0, 5, 5
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.