Paul! Thank you so much, as always you've help me a lot 😃 I will investigate now how can I execute the command received 😄
Have a look at the ACL command "doc_incomplete()". We have an ad-hoc document management system, and just check that prior to checkin, but I suppose you could do the same on document close.
I will note/warn, however, that occasionally this does produce false-positives, so it might also be a good idea to check if the document is saved first, since that typically corrects things, especially when it comes to caret location.