[Solved] UNO Quit refuses to quit

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

[Solved] UNO Quit refuses to quit

Post by gkick »

Hi all,

Not sure whether to post this here or in Base. In my base db menu I have a Quit button to which I have assigned the action Open document webpage and the URL .uno:Quit as per image below. Running the button will not quit but open the File Open Dialog ???

If I alternatively run the Access2Base doCmd Quit macro, it tells me there is no connection even though the frontend is connected.
Anyway, anyone having a working macro to close down Base, but not necessarily other LO windows ?

Thanks
Attachments
UnoQuit.JPG
Last edited by gkick on Thu Oct 24, 2019 8:38 am, edited 2 times in total.
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
JeJe
Volunteer
Posts: 2780
Joined: Wed Mar 09, 2016 2:40 pm

Re: UNO Quit refuses to quit

Post by JeJe »

Code: Select all

sub MacroToCloseCurrentComponent
Thiscomponent.close(true)
end sub
If you have more than one database open you can enumerate all the components to close the database ones.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Re: UNO Quit refuses to quit

Post by gkick »

Thank you Jeje, however I get the following error message as shown in the image. So far I did find another macro named Lopetus2 which does do a pretty clean kill in Windows, but leaves a 0 byte temporary file in the user folder.

Cheers
Attachments
Captura.JPG
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Post Reply