Previous Document Next Document

Object Model Reference : Classes : V : View : Properties : View.OriginY


View.OriginY

Property OriginY As Double

Description

Member of View

The OriginY property returns or specifies the value of the vertical origin of a view.

VBA example

The following VBA example adds a view if there are no saved views. The vertical origins of all saved views are then displayed.

Sub Test()
 Dim Vw As View
 Dim VwCollection As Views
 Dim s As String
 Set VwCollection = ActiveDocument.Views
 If ActiveDocument.Views.Count = 0 Then
  VwCollection.AddActiveView "test"
  For Each Vw In VwCollection
   s = s & Vw.OriginY & vbCr
  Next Vw
 Else
  For Each Vw In VwCollection
   s = s & Vw.OriginY & vbCr
  Next Vw
 End If
 MsgBox "The vertical origin's of the saved views are: " & vbCr & s
 Set Vw = Nothing
 Set VwCollection = Nothing
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.