I have successfully bound to a Word Document and am firing code in the documentevents_close procedure as follows:
IF oCBEvents.llLoaded = .f.
oCBEvents.llStop = .t.
ENDIF
oCBEvents is an Commandbarbutton object. It is designed to load several buttons to a custom commmandbar. That load process takes a few seconds.
Here's the problem, during those few seconds if a user closes the Word Document, I need the Commandbarbutton to stop creating. If it continues to load it will no longer have access to the document that it is trying to add itself to. Resulting in an error.
Here's the question. Is there a nodefault equivalent that I could put in place of my commented code?
I've actually narrowed the few seconds down to the time it takes to run a couple of lines of code. This was done by setting property (oCBEvents.llStop = .t.) then exiting out of the commanbar creation. But still have the problem if the user closes during those few lines of Code.
Thanks, John