Removing Office Macros Using LibreOffice

libre office macros remove

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?

  1. Open the Office document:
    • Open the office document
    • Click the OK button to the macro warning message
  2. 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”)
  3. 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.
  4. 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.