When I move from older versions of Xubuntu to newer ones, I usually do a fresh install for various reasons. When I moved from xubuntu 14.04 to 16.04, I copied the files ~/.config/libreoffice/4/user/basic and ~/.config/libreoffice/4/user/config from 14.04 to 16.04 and libreoffice (writer and calc) worked fine (as near as I could tell). All my calc macros moved fine. When I moved from 16.04 to 18.04, I did the same thing (moving the “basic” and “config” files from 16.04 to 18.04). However, this time calc did not see my calc macros.
I have googled a lot and everybody says to go to calc main menu>Tools>Macros>Organize Macros>LibreOffice Basic>Organizer>Libraries and Import the missing macros. My calc macros (from 16.04) are in the form “basic/Standard/Name.xba”. However, I can’t seem to import them. If I make a new macro under calc (18.04 version) I see a new file added to “basic/Standard” folder named Module1.xba. Examining this file, it looks just the same as the .xba files from 16.04, but calc sees the new macro and doesn’t see the old macros.
Anybody know how to import .xba macro files into a running calc program? Is it possible to just copy the “basic” and “config” files from an old version of libreoffice to a new version like I used to do???
For starters, what about other things such as custom toolbars, shortcuts etc. (if, of course, you had them): do they work? If they do not, check a) permissions, and b) actual location of the user profile directory in your new system.
Thank you very much for the response. I really appreciate it.
The only other thing I had customized was the Writer Toolbar. Yes, it works on the new system. As I said above I can see .xba files for the macros in ~/.config/libreoffice/4/user/basic, but calc ignores them. When I try to import them using Macro Organizer, it just ignores them. If I create a new macro in the 18.04 calc, it puts the .xba file for it in ~/.config/libreoffice/4/user/basic, right along side my macros from the 16.04 system.
What if you rename (or copy) your Name.xba to Module1.xba?
In my fiddling around I created a test macro. Calc put that macro in basic/Standard/Module1.xba. So to test name changing names, I changed Module1.xba to Module2.xba. Then I changed my old RateOfReturnMacros.xba to Module1.xba. Lo and behold, that seemed to work. However, Module2.xba file (and macro) was ignored. What is so special about the name Module1.xba??? Was it just that I already had a Module1.xba that calc knew about???
I really have a problem understanding the design of the macro folders. If I create a new library (Library1), it creates a new folder in the folder “basic” called Library1. Inside Library1 is a new macro module called Module1.xba, and files dialog.xlb, and script.xlb. What is so special about the name Module1.xba???
continued from previous comment.
In the new Library1 I created, if I try to import a .xba file into it, I go to the linux folder containing the .xba file and all I am shown is dialog.xlb and script.xlb. I can’t even see the .xba file that is in the folder. If I select one of those files, no Import takes place. What gives??? I don’t understand why I can’t import .xba files.
Module1 is the default name for a storage of user macros, it is always present. Other ones need to be created. That is the only special thing.
Hello,
It appears you are missing an entry in a file → script.xlb
That file is in the same folder as the XXXXXX.xba files. Here is the contents on Ubuntu 20.04:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false">
<library:element library:name="Module1"/>
<library:element library:name="Module2"/>
</library:library>
There is an entry for each module. Without this entry you will not see the module in the IDE.
Could have copied it all from the old system. I have copied libreoffice
folder from one similar system to another.
Insure that after all modifications have been made that you close all open LibreOffice modules. Then open and verify your macros.
You are correct. There were no modules at all listed in my script.xlb file. I don’t know what would account for this. Any ideas??? When I put an entry in (for the macros i really wanted), they came right up.
Another question: What is the dialog.xlb file used for??? It appears very similar to the script.xlb file.
@ralphl stated
There were no modules at all listed in my script.xlb file. I don’t know what would account for this. Any ideas???
There are numerous possibilities. The common ones are if you have a new install or delete existing user config and start LO. The answer of what happened on your system would require ALL the steps you took since starting this entire process when beginning with the new OS loading.
What is the dialog.xlb file used for???
It is similar to script.xlb. script.xlb
is for macros and dialog.xlb
is for dialogs you have created in the IDE within that module. See → Creating a Basic Dialog
If this answers your question please tick the (upper left area of answer). It helps others to know there was an accepted answer.
A big THANK YOU to the people who got me out of this problem. They save me a lot of work if I had been required to recreate all my macros.