WordEvents_DocumentBeforeClose event ???

Add-in Express™ Support Service
That's what is more important than anything else

WordEvents_DocumentBeforeClose event ???
 
delia buhan




Posts: 2
Joined: 2009-07-02
Hello everybody,

I have a web application in which I can download some word documents. I wanted to mark those downloaded files, so I added some custom properties ( using the DSOfile.dll ).
Those custom properties are used for saving the marked documents into the database, through a web service. 'Till here, everything is working.

What I want (and don't know how to do, if is possible) is to delete the custom properties from the word documents when these are closed.
I've tried this using the WordEvents_DocumentBeforeSave event, but if a document is changed and then is closed, first the WordEvents_DocumentBeforeClose event is triggered and than the WordEvents_DocumentBeforeSave (where I still need those properties).

Any help is gratefully appreciated!
Thanks in advanced!
Posted 02 Jul, 2009 12:07:03 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Delia,

You can try checking Document.Saved for your document; if it is true, then you can safely delete your properties in WordEvents_DocumentBeforeClose; otherwise (i.e. when the document was edited) delete them in WordEvents_DocumentBeforeSave.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jul, 2009 09:40:29 Top
delia buhan




Posts: 2
Joined: 2009-07-02
Hi Andrei,

thanks for your reply. Your idea helped me to resolve the problem.
Thanks a lot!

Best regards,
Delia
Posted 07 Jul, 2009 10:39:16 Top