Overview
Macros plugin allows creating your own macros, scripts that help you automate your routine tasks and standardize documents. ONLYOFFICE macros use JavaScript language syntax and ONLYOFFICE Document Builder API scripting notation.
Key features:
Create your own macros using Document Builder API documentation.
Rename, edit, remove available macros.
Available for text documents, spreadsheets and presentations.
How to use
- Choose Macros from the Plugins tab.
- Search for the necessary macro or create a new one using API documentation.
- Click Run.
How to use VBA-based macros in ONLYOFFICE
Macros written in Visual Basic won’t be compatible with ONLYOFFICE. You can rewrite your old macros to make them work in ONLYOFFICE.
Use our API documentation to learn how to convert macros.
How to install
Macros are pre-installed in all ONLYOFFICE solutions.
In server and cloud versions, you can manage it (remove/re-install) via the built-in Plugin Manager right in the editors with one click.
In case you need to re-install it in the desktop app, follow these instructions.
For desktop editors
-
Archive the plugin files (it must contain config.json, index.html, and pluginCode.js).
-
Change the file extension to .plugin.
-
Go to the Plugins tab, click Settings >> Add plugin, browse for the .plugin file.