let98007
06-29-2009, 03:40 PM
I have a Visual FoxPro application that creates and prints multiple documents using Word automation. Normally the entire process is invisible, but one document requires that the user be able to edit the contents. What I would like to do is bind an Eventhandler in VFP that implements word's ApplicationEvents2 interface. This would allow the user to edit without being able to open documents, create new ones, save or print. Once the user indicates they are through editing (currently that is done by clicking the Closebox but I am open to other suggestions!) I want to prevent the default Quit behavior in Word, unbind the eventhandler, and allow the automation code to continue to process the document in the usual manner.
The Print and Save procedures are no problem; they have a Cancel property to prevent default behavior. So far, I've been unable to control the Quit process.
Another problem I'm sure to face is how to force the VFP app to wait for the editing process to finish. Has anyone implemented something like this before?
The Print and Save procedures are no problem; they have a Cancel property to prevent default behavior. So far, I've been unable to control the Quit process.
Another problem I'm sure to face is how to force the VFP app to wait for the editing process to finish. Has anyone implemented something like this before?