Document.AuthenticView
Method: AuthenticView as AuthenticView (read-only)
Description
Returns an object that gives access to properties and methods specific to Authentic view. The object returned is only valid if the current document is opened in Authentic view mode. The lifetime of an object ends with the next view switch. Any attempt to access objects or any of its children afterwards will result in an error indicating that the object is invalid.
AuthenticView and DocEditView both provide automation access to the Authentic view mode of XMLSpy. Functional overlap is intentional. A future version of Authentic View will include all functionality of DocEditView and its sub-objects, thereby making usage of DocEditView obsolete.
Errors
1400 | The object is no longer valid. |
1417 | Document needs to be open in authentic view mode. |
Examples
' ---------------------------------------
' XMLSpy scripting environment - VBScript
' secure access to authentic view object
' ---------------------------------------
Dim objDocument
Set objDocument = Application.ActiveDocument
If (Not objDocument Is Nothing) Then
' we have an active document, now check for view mode
If (objDocument.CurrentViewMode <> spyViewAuthentic) Then
If (Not objDocument.SwitchViewMode (spyViewAuthentic)) Then
MsgBox "Active document does not support authentic view mode"
Else
' now it is safe to access the authentic view object
Dim objAuthenticView
Set objAuthenticView = objDocument.AuthenticView
' now use the authentic view object
End If
End If
Else
MsgBox "No document is open"
End If