Ask Your Question

How can I recover my macros (Windows 7)?

asked 2014-12-20 20:50:04 +0200

ferguspearson gravatar image

updated 2016-03-06 13:56:40 +0200

Alex Kemp gravatar image

Writer can't find my macros. i've located them in AppData/Roaming/LibreOfice/4/user/basic/standard/module1.xba. But how do I get Writer to find them?

edit retag flag offensive close merge delete


What does > 'Tools' > 'Macros' > 'Organise Macros' > 'LibreOffice Basic...' > 'My Macros' > 'Standard' > 'Module1' show?

Lupp gravatar imageLupp ( 2014-12-20 21:49:53 +0200 )edit

Thanks for commenting. Following that line through, 'Standard' is empty. There is no 'Module1'. Is that where the macros should be? How do I put them there?

ferguspearson gravatar imageferguspearson ( 2014-12-28 21:23:53 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-12-28 22:27:03 +0200

Lupp gravatar image

Your experiences might indicate the strange situation that your user profile is set to reside at a non standard location. The profile you find there would be "dead" in that case. What is the date-time of the most recently changed file under the mentioned path (subfolders allowed)? Normally many files and even folders (in specific the basic folder) there are touched and re-time-stamped on nearly any open/close of LibreOffice.

1) If you find "prehistoric" dates there: find bootstrap.ini in the program folder from which LibO is started on your system and open it with your plain-text editor. Look for the value of the key "UserInstallation". It should read "$SYSUSERCONFIG/LibreOffice/4", at least on a recent Win system. If you find another value, you will know now where to proceed. You may then report again.

2) Otherwise the path was not changed. Try resetting the user profile then as described here. Don't leave out a step and be sure to keep your old profile (renamed) for backup purposes. Having created the new default profie you may copy one of the basic subfolders from your old profile to the proper location in the new one and continue research.

3) If still no macros are shown in the basic-macro manager there must be a corruption of the .xba file(s). Open LibO and create any new standard module (ModuleX, e.g.) in 'My Macros' > 'Standard'. Edit any new basic-macro syntactically correct therein may it do something sensible or not. Close LibO (the file and the macro editor and anything) and open it anew. Macro still present? If not: Find a better advisor.

4) If the new container works fine you may try to import one (and then another) of your old macros copying it from the xba opend in a pain-text editor and pasting it into a) the macro editor or b) the new xba. I never did a) or b) but if your macros are worth it you may find the how-to by your own. Be careful. There are invisible delimiters, e.g.

Report again, please.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-12-20 20:50:04 +0200

Seen: 375 times

Last updated: Dec 28 '14