Page 1 of 1

OLE and MSWord

Posted: Fri Aug 07, 2009 12:04 pm
by ConvertFromOldNGs
by Jason Daniels >> Wed, 26 Sep 2001 20:55:32 GMT

Greetings. This is more of a general OLE question than a Jade specific question but I have posted it here incase somebody knows a Jade trick that might help.

I am trying to streamline a button on my Jade form that allows a user to edit an
embedded OLE object (MSWord document) and save their changes to the Word document if they want.

Normally (non OLE) when user makes changes to a document and then attempts to
close Word they are prompted and asked if they would like to save changes. This is
behaviour that all Word users are familiar with.

When an OLE embedded document is shown in Word via an OleControl the 'do you want to save changes?' prompt does not appear. Any changes you make to the document object in Word are ALWAYS passed back to the OleControl.

It is then up to the host application to ask the user if they actually want to commit
those changes. The host (Jade) application knows that the data has been modified by way
of an Updated event occurring on the OleControl.

Unfortunately the Updated event occurs if the user closes Word, closes the Word
document, or actually presses the Save button in Word. In short you can not tell why
the Updated event has happened and subsequently can not guess if the user really
wants to save the document.

Does anybody know of a way of making Word responsible for finding out if the user
wants to save changes before pushing the data back to the OleControl? Is it even
possible?

Cheers,
Jason.