Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: beforeClose event runs twice - first time says its cancelable - second time not

$
0
0

Ok .. So I've figured it out and you can definitely cancel the first beforeClose event code is :-

 

main

     Sub Main()

     myIndesign.AddEventListener "beforeClose", getref("genPDFClose"), false

End Sub

 

Function genPDFClose(en)

  rem    ...do something here

rem if you want to cancel beforeClose the below two lines work!        

     en.stopPropagation()

     en.PreventDefault()

End Function


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>