To use COM Automation you need to give the file a .
wbt_if extension so that it runs as
invoker/
false. For example,
ExcelRot.wbt_if.
;;;
;; Since Excel can leave a detached process
;; running with a ROT table entry, you can't
;; count on ObjectGet failing. To workaround
;; this use a for loop instead of while loop.
IntControl(73,1,0,0,0)
for i = 1 to 5
Excel = ObjectGet( , "Excel.Application")
Excel.Quit()
Excel = 0
next
:WBERRORHANDLER
IntControl(73,0,0,0,0)
exit
Of course, you can use COM properties and methods to check each running object to determine if it needs to be saved before it is terminated among other things.