Altova XMLSpy 2024 Professional Edition

Method: Goto (eKind as SPYAuthenticElementKind, nCount as Long, eFrom as SPYAuthenticDocumentPosition) as AuthenticRange

 

Description

Retrieve a range object that points to the beginning of the nCount element of type eKind. The start position is defined by the parameter eFrom. Use positive values for nCount to navigate to the document end. Use negative values to navigate towards the beginning of the document.

 

Errors

2000

The authentic view object is no longer valid.

2003

Target lies after end of document.

2004

Target lies before beginning of document.

2005

Invalid element kind specified.

The document position to start from is not one of spyAuthenticDocumentBegin or spyAuthenticDocumentEnd.

Invalid address for the return parameter was specified.

 

Examples

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

' Scripting environment - VBScript

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

Dim objAuthenticView

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

Set objAuthenticView = Application.ActiveDocument.AuthenticView

 

On Error Resume Next

Dim objRange

' goto beginning of first table in document

Set objRange = objAuthenticView.Goto (spyAuthenticTable, 1, spyAuthenticDocumentBegin)

If (Err.number = 0) Then

 objRange.Select()

Else

 MsgBox "No table found in document"

End If

© 2017-2023 Altova GmbH