Previous Document Next Document
View.OriginX

Property OriginX As Double

Member of View

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

The following code example checks to see whether there are 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 2007 Corel Corporation. All rights reserved.