Previous Document Next Document

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


View.OriginX

Property OriginX As Double

Description

Member of View

The OriginX property returns or specifies the value of the horizontal origin of a view.

VBA example

The following VBA example checks for views in the Views collection. If there is a view, it prints the horizontal origin of the view. If not, it adds a view and prints the horizontal origin.

Sub Test()
 Dim Vw As View
 Dim VwCollection As Views
 Set VwCollection = ActiveDocument.Views
  If VwCollection.Count > 0 Then
   Set Vw = VwCollection.Item(1)
   MsgBox "The horizontal origin of the active view is: " & Vw.OriginX
  Else
   Set Vw = VwCollection.AddActiveView("TestView")
   MsgBox "The horizontal origin of the active view is: " & Vw.OriginX
  End If
 Set Vw = Nothing
 Set VwCollection = Nothing
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.