"$d_SysMaint""LibreOffice/create a new macro.txt" www.BillHowell.ca 25Aug2018 initial 05Dec2020 - Don't forget Pitonyk!!!! https://www.pitonyak.org/OOME_3_0.pdf Remember - spreadsheet function names are NOT necessarily the same as for macros!! ************* 10Nov2016 Howell_IEEE_prohibited_macLib/Howell_IEEE_prohibited_script.xba database-type script 1. I set up the macro in LibreCalc - see "Creating a new macro" instructions below 2. Initial test before CONVERTING the macro, by opening a spreadsheet : >> in LibreCalc : Tools -> macros -> Organize macros -> LibreOffice basic >> is listed : Howell_IEEE_prohibited_macLib >> OOPS - script is labelled "Howell_ToDos_script!!! 3. Correct the script name : in /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib/script.xlb lines : changed to : >> OK, now it seems to work 4. Convert the macro to what I need : >> Other, better examples in **************************************** Creating a new macro (using an example Howell_IEEE_prohibited_macLib) NOTE: I NEED macros to be in /home/bill/.config/libreoffice/4/user/basic That way my weekly backups automatically catch them!! 1. CLOSE all instances of LibreOffice 2. EDIT LibreCalc Basic script file : /home/bill/.config/libreoffice/4/user/basic/script.xlc -> copy an existing line with a maLib, eg : copy to 3. COPY an existing macro directory and rename to new macro, eg. : copy /home/bill/.config/libreoffice/4/user/basic/Howell_ToDos_macLib to /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib 4. EDIT /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib/dialog.xlb change line : to line : 5. EDIT /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib/script.xlb change lines : to lines : 6. CHANGE filename of script file : from : /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib/Howell_ToDos_script.xba to : /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib/Howell_IEEE_prohibited_script.xba 7. Start Libre[Write,Calc] to EDIT & CONVERT the old macro to the new macro (old code can be handy as a template) : Menu -> Tools -> Macros -> Organize Macros /home/bill/.config/libreoffice/4/user/basic/Howell_IEEE_prohibited_macLib/Howell_IEEE_prohibited_script.xba 8. No need to backup all macro directories - this is done by regular weekly and monthly backups # enddoc