Altova XMLSpy 2025 Enterprise Edition

Application.OnBeforeOpenDocument

Accueil Préc Haut Suivant

Event: OnBeforeOpenDocument(objDialog as FileSelectionDlg)

 

Description

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.

 

Examples

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