Please enable JavaScript to view this site.

Altova XMLSpy 2020 Enterprise Edition

See also


Method: GotoPrevious (eKind as SPYAuthenticElementKind) as AuthenticRange



Sets the range to the beginning of the element of type eKind which is before the beginning of the current range. The method returns the modified range object.




The authentic range object, or its related view object is no longer valid.


Target lies before beginning of document.


Invalid element kind specified.

Invalid address for the return parameter was specified.



' --------------------------------------------

' Scripting environment - VBScript

' Scan through the whole document tag-by-tag

' --------------------------------------------

Dim objAuthenticView

' we assume that the active document is open in authentic view mode

Set objAuthenticView = Application.ActiveDocument.AuthenticView


Dim objRange

Set objRange = objAuthenticView.DocumentEnd

Dim bEndOfDocument

bBeginOfDocument = False


On Error Resume Next

While Not bBeginOfDocument


 If ((Err.number - vbObjecterror) = 2004) Then

         bBeginOfDocument = True


 ElseIf (Err.number <> 0) Then

         Err.Raise ' forward error

 End If


© 2019 Altova GmbH