API Documentation > CorelDRAW > 2025-v26 > ActiveView > IVGActiveView
ActiveView.ToFitArea method
Fits the active view to the rectangle
Syntax:
Sub ToFitArea(ByVal Left As Double, ByVal Top As Double, ByVal Right As Double, ByVal Bottom As Double)
Parameters:
Name Type Description
Left
Double
Top
Double
Right
Double
Bottom
Double
Remarks:
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.
Examples:
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