Hi,

How can I throw an exception from openoffice.org Basic?
I'm trying to prevent a mailmerge document from closing with a
CloseVetoException. So far I have this code.


Sub RegisterListener
 oListener = CreateUnoListener( "DocumentListener_","
com.sun.star.document.XEventListener" )
 ThisComponent.com_sun_star_document_XEventBroadcaster_addEventListener(
oListener )
End Sub

Sub DocumentListener_notifyEvent( o as object )
   If o.EventName = "OnPrepareUnload" Then
       REM
       REM Throw the exception here
       REM
   End If
end sub

Sub DocumentListener_disposing()
End Sub

--
Knut Olav Bøhmer

Reply via email to