How can I know in LotusScript if a user has tried to close the ui doc?

I apologize in advance if this has been addressed before, but a search of “close” and “indicator” turned up nothing and I’m not really sure what magic combination of words would so here goes…

Is there any way in LotusScript (from within QuerySave, for example) to tell if a user tried to close a document?

I’m using some excellent suggestions received here on closing and re-opening the uidoc so a user can see back-end changes made to a rich text field, but the problem I have now is that if a user does a save and exit, the save gets executed but the uidoc remains open. This is because my code has closed and re-opened it so Notes doesn’t know that the user wanted it closed in the first place.

If there was a way to tell that “save and close” had been requested instead of merely “save”, then I could skip the close/re-open logic. And I’m not talking about a “save and close” button, where I could add some code. I’m refering to a situation where the user clicks the “x” to close the document, gets prompted to save changes and says yes.

Any ideas?

Thanks in advance,

Beth Villanyi

Subject: How can I know in LotusScript if a user has tried to close the ui doc?

Maybe I am misunderstanding you, but couldn’t you write some code into the queryclose event? Perhaps using the queryclose event to write a value to a hidden field that denotes a previous save, or close?

Subject: RE: How can I know in LotusScript if a user has tried to close the ui doc?

It never even gets to the queryclose until after I have closed and re-opened the ui doc, and by that time it’s a different ui doc so it doesn’t close.