Importing old macros

I’m on a Mac. I have some old macros that were in LibreOffice’s directory in ~/Library/Application Support. I used to use them regularly, but then spent a number of years dealing with working places other than at my computer. These were in folders named/numbered 3 and 4. I don’t know if that’s the versions or not. I’ve setup a new Mac and just downloaded and installed the latest version of LibreOffice.

What’s the best way to import these macros (written in LO’s BASIC) at this point? And is there a way to point to another directory (like one in my Documents folder) for LO to scan for macros? (That would keep them in a user data space that I back up regularly and it’d guarantee that at some point, if I have to do something like delete and re-install LO, I wouldn’t accidentally lose these files in the Library directory tree.

3 and 4 used to be the major version numbers, however LibreOffice gave up this naming scheme. The profile remains in 4/user/.
Just shut down LO, backup 4/user/basic and copy user/basic with all files and subfolders from the old profile to the new one in order to restore all the libraries and modules from the old profile. If your new, backed up basic directory contains some valuable stuff, it is possible to merge that stuff with the restored profile, however, copy and paste won’t do.

P.S. make sure that the restored basic directory has adequate user and access priviledges. You, the logged in users, needs to be the owner with read and write access to all files and directories.

1 Like

Thanks - let me rephrase it so I can be sure I’m doing the right thing here.

I’ve made a copy of the original ~/Library/Application Support/LibreOffice/4 on a network share, so I can get to it from my old Mac and my new one. From there, the one I need to back up is the current (new) settings from the newly installed LO on my new system, before I copy my old settings I currently have on my NAS. (Got all the stuff about access settings - but it’s just me, so multiple users isn’t an issue.) The new install is still fresh - as in not modified. So will this basically setup the new LO install to be like my old one (in terms of prefs and so on)?

I also just realized I had added a custom menu for quick access to macros I didn’t want to bind to a key - and that I do have some macros bound to keys. Will this transfer all that, too?

I realized I really had nothing to use. The install to be experimented on is brand new, with no settings I had customized and I was working with a copy of my original data, so I renamed the directory “4” on my new system (in the Application Support area) as 4-NewInstall-BU (BU for backup) and copied the 4 directory tree from my older system over and it worked.

Even my custom menu, the keybindings, and more, were all copied over and working when I ran LO to check it out.

I have a few programs where I write plugins or macros for, like LibreOffice and Blender. Upgrading to a new computer is not fun when you have to go out of the way to make sure you don’t lose macros, plugins, extensions, or anything else like that. I think I’m going to going on and write a script or two that handles updates like this when I move to a new computer (or moving to a 2nd on that I’ll be using while the other is still in use).

Plus, with a few extra lines of code to copy my configs to an NAS, I can easily share updates between the computer in my study and the one in my shop (and any others I might need to add).

Right. When you replace the entire profile directory, you transfer all the settings, macros, spell check dictionaries, galleries, extensions installed by the user, and the templates that appear under menu:File>Templates>Organize…
Have a look at Tools>Options>LibreOffice>Paths for some paths beyond the profile, which may have been included on the old system.

Thanks! I’ll check on that. I doubt I have much to worry about in there, but it’s best to check on everything before I dump the old systems with all that on them!