Previous Document Next Document

Object Model Reference : Classes : D : Document : Properties : Document.Views


Document.Views

Property Views As Views

Description

Member of Document

The Views property returns a Views collection containing all views saved in the View Manager docker.

The Views property returns a read-only value.

VBA example

The following VBA example creates a new document and saves the current view as Saved View. It then creates a rectangle, zooms in on it, saves the resulting view as Full Rectangle, shows a message box, and restores the original view.

Sub Test()
 Dim d As Document
 Dim v As View
 Dim s As Shape
 Set d = CreateDocument
 Set v = d.Views.AddActiveView("Saved View")
 Set s = d.ActiveLayer.CreateRectangle(0, 0, 2, 2)
 d.ActiveWindow.ActiveView.ToFitShape s
 d.Views.AddActiveView "Full Rectangle"
 MsgBox "Zoomed in at the rectangle. Press OK to restore view."
 v.Activate
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.