[Solved] How to import library Standard

Keyboard macros or custom scripts

[Solved] How to import library Standard

Postby Ponny » Thu Nov 19, 2020 2:25 pm

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.10
User avatar
Ponny
 
Posts: 136
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard

Postby Villeroy » Thu Nov 19, 2020 3:23 pm

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
Villeroy
Volunteer
 
Posts: 30161
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to import library Standard

Postby RoryOF » Thu Nov 19, 2020 3:25 pm

Or, if you wish the same configuration as previously, replace all %APPDIR%\OpenOffice\4\ from your backup.
Apache OpenOffice 4.1.10 on Xubuntu 20.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 32969
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: How to import library Standard

Postby Ponny » Sun Nov 22, 2020 2:32 pm

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.10
User avatar
Ponny
 
Posts: 136
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard [SOLVED]

Postby Villeroy » Sun Nov 22, 2020 3:57 pm

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
Villeroy
Volunteer
 
Posts: 30161
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to import library Standard [SOLVED]

Postby Ponny » Sun Nov 22, 2020 7:04 pm

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.10
User avatar
Ponny
 
Posts: 136
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard [SOLVED]

Postby Ponny » Sun Nov 22, 2020 7:26 pm

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.10
User avatar
Ponny
 
Posts: 136
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: How to import library Standard [SOLVED]

Postby Villeroy » Sun Nov 22, 2020 8:04 pm

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
Villeroy
Volunteer
 
Posts: 30161
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] How to import library Standard

Postby Ponny » Mon Nov 23, 2020 12:08 pm

Thankyou
I will try this.
MS Windows 10: OpenOffice 4.1.10
User avatar
Ponny
 
Posts: 136
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 3 guests