Examples:
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