We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

How do I recover macros after replacing my profile

asked 2019-12-19 16:58:46 +0200

ptoye gravatar image

updated 2021-07-03 16:22:53 +0200

Alex Kemp gravatar image

Somehow my profile got corrupted so I renamed it as the wiki tells me to.

I copied the Basic folder from the renamed profiles to the new one but none of my macro libraries have returned. What else should I do to get them back? Do I have to register them in some way with LO? I've even rebooted in case that helped.

I'm pretty sure that last time I had to replace my profile the macros came back OK, but I can't remember exactly what I did, and the wiki doesn't say anything about it.

[Added later} Here are a couple of screenshots. One shows the File Explorer view of the Basic folder in the profile, the other shows the LO macros that are (and aren't) there.

explorer view

LO view

edit retag flag offensive close merge delete

Comments

1

The Basic libraries and modules actually need to be registered in a sense, but this is done by providing the files script.xlc and dialog.xlc in the basic folder and respectively script.xlb and dialog.xlb in the library folders. If these files are present in their placees in the new profile (dialog.xl? may be absent if no dialogs are defined in a library), and you don't have access to the libraries/modules from LibO, I would doubt if you actually copied to the correct folder. If you define any new Basic module with an arbitrary Sub and leave LibO, is the module then saved to the expected location for the Standard library as a .xba file?

Lupp gravatar imageLupp ( 2019-12-20 18:55:17 +0200 )edit

I've added two images, one of what Explorer sees and one of what LO sees. For some reason they don't both appear within the message.

ptoye gravatar imageptoye ( 2019-12-21 11:00:45 +0200 )edit

Aha! That's the problem - the dialog.xlc and script.xlc didn't get copied over - I must have clicked the "don't overwrite" by mistake. The problems of programs keeping what's meant to be the same data in two different places and the wiki not telling you how to make sure they're in step...

Now, if you post this as an answer I can vote it up and give you brownie points.

ptoye gravatar imageptoye ( 2019-12-21 11:24:31 +0200 )edit

I edited my answer the way you suggested. Please mote anyway that you also can answer your own questions.

Lupp gravatar imageLupp ( 2019-12-21 11:53:04 +0200 )edit

Ah yes, but I think you get karma for good answers. And you deserve it for telling me something I didn't know (not that hard).

ptoye gravatar imageptoye ( 2019-12-21 13:16:13 +0200 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2019-12-19 19:34:24 +0200

Lupp gravatar image

updated 2019-12-21 12:10:00 +0200

Hopefully you made a backup of your previous user profile. If not you have lost your macros most likely.

Got to the backup and find the ...\user.bak\basic\ folder where user.bak is the supposed name of the backup folder.
Copy it completely and replace the newly created ...user\basic\ folder with it.

This is for Windows. For different OS regard https://wiki.documentfoundation.org/U... .

If you want to remove / change /add routines do it from the Basic IDE.

===Edit 2019-12-21 10:50 UTC===
As a result of the exchange via comments on the question I add the following:

The Basic libraries and modules need to be registered in a sense. This is done automatically by the Basic IDE writing to the files script.xlc and dialog.xlc in the basic folder and respectively script.xlb and dialog.xlb in the library folders.

When recreating the Basic part in a virgin user profile from the backup, these files need to also be correcctly copied to their places in the new profile (dialog.xl? may be absent if no dialogs are defined in a library). If they are present there and not corrupted themselves, everything should work.

A single module mName is saved to a mName.xba file in the library's folder. The content, however is in XML and therefore many characters of the Basic code are escaped in html style. To recreate a module for which the .xlb file was lost. or which not correctly is listed in the .xlc file via the Basic IDE is annoying therefore. It may be easier to very thoroughly create/edit manually the needed XML files instead.

edit flag offensive delete link more

Comments

(This comment below by the OQ @ptoye was posted before the answer was edited.
Edited by @Lupp)

Thanks. But that's what I've done :( I'll edit the original question to add a couple of screenshots.

{added later] I've added two images, one of what Explorer sees and one of what LO sees. For some reason they don't appear within the message - you have to click them.

ptoye gravatar imageptoye ( 2019-12-20 17:29:25 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-12-19 16:58:46 +0200

Seen: 185 times

Last updated: Dec 21 '19