I'm trying to learn to write macros for LibreOffice in Python. I made simple macro, put in into ~/.config/libreoffice/4/user/Scripts/python/ and found it in Tools/Macros/Organize Macros/Python.../My Macros. So far all works as expected, macro is visible. But when I click on it, the Run button stays grayed out. I cannot run it. Does anyone know what might be the cause? Thanks EDIT: File is executable, I set the rights to 777 just to be sure. Python code is valid. EDIT2: I reinstalled LibreOffice and it works now. Probably was something wrong with my installation. Script file in ~/.config/libreoffice/4/user/Scripts/python/ set as executable works. And @ngulam examples worked even before reinstall. Thanks for all the advice you've given me and have a good day. Continue reading...