How to use and manage Basic and VBA compatible macros in Collabora Online

Running a Macro in Collabora OnlineThe original release of Collabora Online 6.4.7  and CODE 6.4.7 introduced the ability to run macros in Online. Due to the security disclosure CVE-2025-24796 that highlighted the ability to run malicious code remotely from a macro, the default setting for macros has been disabled from 22.04 onwards. Be aware the interface to run macros (under File > Macros for the tabbed interface and in the compact menu Tools > Macro) is only available in some integrations. Macro editing is not possible online and needs to be done in the desktop applicaton. 

Configuration settings in coolwsd.xml: enabling and setting the security level

By default, execution of macros is completely disabled. The administrators can enable that in the security node of the /etc/coolswd/coolwsd.xml configuration file.

<enable_macros_execution desc="..." type="bool" default="false">false</enable_macros_execution>

Once enabled, the administrator can decide which security level should be used for the macro execution. Currently there are two levels:

  • 0 (Low, not recommended) All macros will be executed without confirmation.
  • 1 (Medium, the default) Confirmation required before executing macros from untrusted sources.

<macro_security_level desc="..." type="int" default="1">1</macro_security_level>

Docker configuration

You’re able to access and copy the coolwsd.xml file within a Docker install using the follow commands.

docker ps --format “{{.Names}}”

Make a note of the Docker container’s name that you want to update. This copies the coolwsd.xml file from the container to your local machine for editing, we’re using Nano here.

docker cp <container name>:/etc/coolwsd/coolwsd.xml coolwsd.xml
nano coolwsd.xml

If available on your Collabora Online install change the status of the following line from FALSE to TRUE.

<enable_macros_execution desc="..." type="bool" default="false">false</enable_macros_execution>

With Nano press Ctrl + O and then Ctrl + X to save and close. Copy the updated configuration file back into the container with:

docker cp coolwsd.xml <container name>:/etc/coolwsd/coolwsd.xml

Docker will notice the change and automatically restart the container. On older versions of Collabora Online you can find options to run Macros under File > Macros for the tabbed interface and in the compact menu Tools > Macro.

Sources for Macros

Macros can be either embedded in the documents, or can be installed on the server. When opening a document with macros, in the security level “1” (Medium), the users will always see the following dialog, and will have to confirm they understand the risk.

Limitations for Macros in Collabora Online

Due to the limitations of editing the documents online, and due to the strict security design of Collabora Online, running macros have several limitation limitations. Following list of examples is not exhaustive, if you find a case that is not working for you, please let us know.

It is not possible to:

  1. Access Database sources, or open and access data as Database source.
  2. Use XForms, Forms, Controls, click buttons.
  3. Access other documents, or open external documents.
  4. Create new document from template.
  5. Mail Merge, or merge all documents in a directory.
  6. Call an external program.
  7. Use the Shell command.
  8. Extract a Zip File.
  9. Get and set the current directory.
  10. Connect to a remote OOo server using Basic.
  11. Create a toolbar for a component type.
  12. Toggle the design mode, or access the toolbars in any way.
 

Find out more about macros and all the other new features in our Collabora Online 6.4.7 announcement.

Leave a Reply

Learn how we helped 100 top brands gain success