[Solved] How to import library Standard

Keyboard macros or custom scripts
Post Reply
User avatar
Ponny
Posts: 168
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

[Solved] How to import library Standard

Post by Ponny »

How to import library Standard?

Imagine this situation.
I have new computer.
Fresh install of OpenOffice.
I want to import my macros from backup.
I can import all libraryes except "Standard".


Ponny
Last edited by Ponny on Sun Nov 22, 2020 2:32 pm, edited 1 time in total.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Villeroy
Volunteer
Posts: 30803
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to import library Standard

Post by Villeroy »

Replace directory %APPDIR%\OpenOffice\4\user\basic\Standard
 Edit: Replace the entire %APPDIR%\OpenOffice\4\user\ in order to transfer all settings, macros, templates and stuff 
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 33647
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: How to import library Standard

Post by RoryOF »

Or, if you wish the same configuration as previously, replace all %APPDIR%\OpenOffice\4\ from your backup.
Apache OpenOffice 4.1.13 on Xubuntu 22.04.1 LTS and very infrequently on Win2K/XP
User avatar
Ponny
Posts: 168
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard

Post by Ponny »

Thankyou

I made this after many different tryes. But I stil hope, there is some more "legal" way. Like this via dialog window. Macros ..... Libraryes ..... Import ..... or something similar.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Villeroy
Volunteer
Posts: 30803
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to import library Standard [SOLVED]

Post by Villeroy »

At some point I started to organize my Basic code in libraries other than "Standard". These can be exported and imported.
WIth Python as macro langauge every module is nothing more than a text file in the Scripts/python/ directory.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Ponny
Posts: 168
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard [SOLVED]

Post by Ponny »

I tried to move module from Library "Standart" to "Tukec".
But then macro stop working.
error in line:
document = ThisComponent.CurrentController.Frame

But there is no change in this module.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Ponny
Posts: 168
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard [SOLVED]

Post by Ponny »

Uf, sorry, my mistake. I forgot to point it to right Ooo file.
Well, there is more things in module, about user dialog window. I need to find it and change some things, to macro - user dialog - work.
This will need some time.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Villeroy
Volunteer
Posts: 30803
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to import library Standard [SOLVED]

Post by Villeroy »

Now you can export the library as an extension and port it to other machines. And you can import the library to a parallel installation pointing to the librarie's script.xlb. And you can import the library into a document.

Export
Call the organizer dialog for modules, dialogs and libraries.
Select the libraries tab and select your library under [My Macros] or within a loaded document if the lib in question is embedded in a document or template.
Click [Export...] and export an extension file (*.oxt) which contains nothing but that library installable in OpenOffice and LibreOffice as well.

Import
Call the organizer dialog for modules, dialogs and libraries.
Select the libraries tab and select either [My Macros] or a loaded document as target container.
Click [Import...] and point either to an extension file containing the Basic library, a document containing the Basic library or point to the script.xlb of the library within your profile.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Ponny
Posts: 168
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: [Solved] How to import library Standard

Post by Ponny »

Thankyou
I will try this.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
Post Reply