Previous Document Next Document
Document.CreateView

Function CreateView(Name As String, OriginX As Double, OriginY As Double, [Zoom As Long], [Page As Page]) As View

Member of Document

The CreateView method creates a new View object (that is, a new item in the View Manager list).

Parameters
Description
Name
Specifies the name of the view in CorelDRAW
OriginX
Specifies a value associated with the x-coordinate of the view. This value is measured in document units.
OriginY
Specifies a value associated with the y-coordinate of the view. This value is measured in document
Zoom
Specifies a user-defined magnification level for a customized view
This parameter is optional, and its default value is 0.
Page
Creates the view for a specific page in the document
This parameter is optional, and its default value is Nothing.

The following code example creates a new view and activates it.

Sub Test() 
 Dim v As View 
 Dim x As Double, y As Double 
 x = ActivePage.SizeWidth / 2 
 y = ActivePage.SizeHeight / 2 
 Set v = ActiveDocument.CreateView("My New View", x, y, 200) 
 v.Activate 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.