I often have to generate technical documents, and although I often use my standard templates, sometimes a customer provides me their preferred template. This happened last week, and I was surprised to see a warning message when I opened the Word template that had been provided. The warning read, “This document contains macros. Macros may contain viruses. Execution of macros is disabled due to the current macro security settings in LibreOffice…” Well there wasn’t any good reason for macros in this Word document. I attempted to delete the macros in various ways, without success. How was I to delete the macros I didn’t want, using LibreOffice?
- Open the Office document:
- Open the office document
- Click the OK button to the macro warning message
- Save as a LibreOffice document
- From the File menu | Save As menu item
- Select as a LibreOffice document file type (e.g. “ODF Spreadsheet” or “ODF Text Document”)
- Save as a Microsoft document
- From the File menu | Save As menu item
- Select as a Microsoft document file type (e.g. “Microsoft Excel” or “Microsoft Word”)
- Note: you might want to select a different name, so as to avoid over-writing the original.
- Validation:
- Close LibreOffice
- Double-click the new document you created in step three and validate the macro warning does not appear
For grins I went to look at the functionality in the original attached macro, and it was just a skeleton without functionality. Since I didn’t want to return the edited document with macros that scare the end user, I now have a viable procedure for removing those macros.