Macro conversion?

The only thing I know about macros is trying to learn coding them makes me cry.

I’m part of a group which uses Word macros (link below). Is there any way to make them to LibreOffice compatible? I started to and ended up down a rabbit hole with a headache…

The best solution: Rewrite all of the VBA macros based on the Libreoffice API, and your favourite programming language and environment. API: Application Programming Interface.
Available programming languages:

  • StarBasic and the built-in IDE
  • Python
  • Java
  • JavaScript
  • BeanShell

Otherwise, some of the VBA macros can run in LibreOffice in the compatibility mode. See the Help:
https://help.libreoffice.org/6.3/en-US/text/sbasic/shared/compatible.html

https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03103350.html

With LibreOffice, you can use paragraph styles, character styles and pages styles instead of macros.

Ideally, VBA macros should just work in VBASupport mode. However, this ideal is very far from completion. So the only advise (beside the “rewrite using LibreOffice own API”, which would be obviously unrealistic for a person who doesn’t know how to write macros at all, and who uses someone else’s very complex macros) would be: if these macros don’t work with the compatibility mode enabled (i.e., in a Basic module having Option VBASupport 1 as its first line), then you only can report bugs for each failing construct, one by one, and hope that by year 2100, it becomes usable.

Thank you, I’ll try that. What is an example of a simple vs complex macro? As a writer, I’m wondering if they would help me in any way.