"listening" for attachment/ OLE change - make sure doc is updated and post-process updated data

Hi,

Have been bashing my head against this for quite a while - would appreciate your help

Here is the basic functionality I would like to create.

A user clicks a button, the script grabs an attachment or OLE object and opens it in excel. Whenever the user saves the change (either by explicitly saving or by closing and opting "yes" when prompted to save before closing), the attachment/ OLE object is updated in the document.

Also, after the user is done with the update and the document is updated, I would like to run some post-processing scripts to auto-generate some rich text tables in the document (or largely import the updated data to a rich text table).

Trying to go with an attachment...

As far as I have seen, it is needed to Extract the file to a local drive before it is possible to load it in excel or try to run any script on the data. But then the "save" action will be done on the local copy, not on the document so it is needed to "listen" to this "save event" (or save and close event) and re-attaching the updated copy stored locally to the document and then running the post-process scripts.

Trying to go with OLE...

Seems like the more natural way to enable this functionality.

When I double click an embedded object I can update content and close and the object stays updated and linked to the document.

but I can't figure our how to do the same by lotusscript. When I grab the OLE object and run "Activate", the script does not wait for an update and completes the script - when getting to "End Sub" it just closes the excel window. So I need to make the script wait for the user to be finished, like it is done when clicking on the object manually.

Any ideas on how to allow this functionality will be much appreciated.

Hi Amit,

this functionality is already built-in in your client. Every time you edit attachments or embedded objects the client updates these objects within your notes document after it has been edited with 3rd party apps. Simple set your notes doc in edit mode (!) and double click on attachment or ole object and chose "edit" or "edit with..." (do not use "open" or "save"!). The client monitors the temporary files for updates.

After you are done and saved the notes document the post-process scripts could run in any type of script agent later on your server or as a script within your form every time you save the doc.

HTH
Carsten