I want to write macros to change some of the properties of paragraph and character styles. In particular, highlight by changing the background color.
So I used the Macro Recorder and made the change, and saw that it recorded a call to dispatcher.executeDispatch with specific arguments. I had planned on seeing what the arguments were for changing and changing back, and then writing code to toggle the state.
⋮
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Param"
args1(0).Value = "InnerDialog"
args1(1).Name = "Family"
args1(1).Value = 1
dispatcher.executeDispatch(document, ".uno:EditStyle", "", 0, args1())
But I didn’t get that far. Any attempt to run the macro crashes LibreOffice. I tried the Macro > Run menu, and I tried Run Basic from the code editor.
The empty Main macro that is already present does not crash (though it doesn’t do anything). I see a library BBkode that presumably is used by the extension, and the extension works.
Furthermore, after running LibreOffice again, the macro is missing. I even tried making a new Library for my stuff, and it also is no longer present.
What can I do?