Altova XMLSpy 2024 Enterprise Edition


Accueil Préc Haut Suivant

Event: OnBeforeOpenDocument(objDialog as FileSelectionDlg)



This event gets fired whenever a document gets opened via the OpenFile or OpenURL menu command. It is sent after a document file has been selected but before the document gets opened. The file selection dialog object is initialized with the name of the selected document file. You can modify this selection. To continue the opening of the document leave the FileSelectionDlg.DialogAction property of io_objDialog at its default value spyDialogOK. To abort the opening of the document set this property to spyDialogCancel.



Given below are examples of how this event can be scripted.


XMLSpy scripting environment - VBScript:

Function On_BeforeOpenDocument(objDialog)

End Function


XMLSpy scripting environment - JScript:

function On_BeforeOpenDocument(objDialog)




XMLSpy IDE Plugin:

IXMLSpyPlugIn.OnEvent (26, ...)        // nEventId = 26



© 2018-2024 Altova GmbH