Base shutdown without killing the rest of LO


With regards to Win10 and terminating Base I found some posts in the past, however have not come across a solution as how to exit base without at the same time closing other apps like Calc or Writer.

Of course there are manual ways by either using the close button and or sequential file close from the menu.
Is there any known solution to perform a nice clan shutdown from a button ? For the time being I am using a sledgehammer macro called Lopetus2 which seems to work without any major drawback with the exception that it sometimes leaves a temp file behind and of course kills the rest of LO.
Thanks for your thoughts

And what is that “Lopetus2”? Your question so far looks like “I’m using something - I’m not telling what, but it doesn’t fit my needs; what’s wrong?” (Presumably this)

Thanks for the link, but no, here is a link relating to Lopetus

Are my eyes going bad? Looks like the same link to me!

Just that one is a search result which actually points to the other.

Think your eyes are pretty good, mine however ??


From my answer on this post → Clean exit macro from DB and LibO ?

sub CloseDoc
    document = ThisComponent.getParent().getCurrentController().getFrame()
end sub

This will close currently open .odb when run from form. Take note that it does just what it states - closes. Does no checking if something was in process. That is up to you to check for.

Thank you very much, working! Much appreciated