Converting documents between LibreOffice and Microsoft Office file formats can be essential for ensuring compatibility and ease of access across different platforms and software suites. On Linux, several methods and tools are available to facilitate this conversion process, enabling users to switch seamlessly between file formats without losing data integrity or formatting. This guide will explore these options in detail, providing step-by-step instructions for each method.
In this tutorial you will learn:
- How to use LibreOffice to convert documents to Microsoft Office formats
- How to use command-line tools for batch conversion
- How to use third-party tools for document conversion

Category | Requirements, Conventions or Software Version Used |
---|---|
System | Any Linux distribution |
Software | LibreOffice, Pandoc/td> |
Other | Internet connection for downloading software |
Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Converting Documents Between LibreOffice and Microsoft Office File Formats on Linux
There are several methods available for converting documents between LibreOffice and Microsoft Office file formats on a Linux system. These methods range from using the LibreOffice application itself to employing command-line tools for batch processing. Here we will cover two primary methods: using LibreOffice GUI and utilizing Pandoc for text-based document conversion.
- Using LibreOffice GUI: One of the simplest methods to convert documents is through the LibreOffice graphical user interface.
Open LibreOffice Writer:
$ libreoffice --writer
In LibreOffice Writer, open the document you wish to convert. Then, go to the ‘File’ menu, select ‘Save As’, and choose the desired Microsoft Office format (such as .docx for Word documents). This method is straightforward but may not be practical for batch conversions.
- Using Pandoc for Text-Based Document Conversion: Pandoc is a universal document converter that works well for text-based documents such as markdown and HTML.
Install Pandoc:
$ sudo apt-get install pandoc
Convert a markdown file to DOCX:
$ pandoc -o output.docx input.md
This example shows how to install Pandoc and use it to convert a markdown file to a DOCX file. Pandoc is versatile and supports many formats, making it an excellent tool for converting documents that are primarily text-based.
DID YOU KNOW?
that Linux users can automate the conversion of multiple documents between LibreOffice and Microsoft Office formats using simple shell scripts? By combining tools like unoconv and inotifywait, you can set up a system to automatically detect and convert newly added files in a directory, streamlining workflows and ensuring that documents are always in the desired format without manual intervention. This can be particularly useful for businesses and collaborative environments where file format compatibility is crucial.
Additional Document Conversions Examples
- Convert document ODF to DOCX: Use Pandoc to convert an ODF document to a DOCX format.
Convert a document from ODF to DOCX using Pandoc:
$ pandoc -s document.odt -o document.docx
This command converts an ODF (LibreOffice Writer) file to a DOCX (Microsoft Word) file using Pandoc.
Convrting an ODF (LibreOffice Writer) file to a DOCX (Microsoft Word). - Convert document ODF to DOC: Use Pandoc to convert an ODF document to a DOC format.
Convert a document from ODF to DOC using Pandoc:
$ pandoc -s document.odt -o document.doc
This command converts an ODF (LibreOffice Writer) file to a DOC (Microsoft Word) file using Pandoc.
- Convert document DOCX to ODF: Use Pandoc to convert a DOCX document to an ODF format.
Convert a document from DOCX to ODF using Pandoc:
$ pandoc -s document.docx -o document.odt
This command converts a DOCX (Microsoft Word) file to an ODF (LibreOffice Writer) file using Pandoc.
- Convert presentation ODP to PPTX: Use Pandoc to convert an ODP presentation to a PPTX format.
Convert a presentation from ODP to PPTX using Pandoc:
$ pandoc -s presentation.odp -o presentation.pptx
This command converts an ODP (LibreOffice Impress) file to a PPTX (Microsoft PowerPoint) file using Pandoc.
- Convert presentation PPTX to ODP: Use Pandoc to convert a PPTX presentation to an ODP format.
Convert a presentation from PPTX to ODP using Pandoc:
$ pandoc -s presentation.pptx -o presentation.odp
This command converts a PPTX (Microsoft PowerPoint) file to an ODP (LibreOffice Impress) file using Pandoc.
- Convert PDF to DOCX: Use Pandoc to convert a PDF document to a DOCX format.
Convert a document from PDF to DOCX using Pandoc:
$ pandoc -s document.pdf -o document.docx
This command converts a PDF file to a DOCX (Microsoft Word) file using Pandoc.
- Convert HTML to DOCX: Use Pandoc to convert an HTML document to a DOCX format.
Convert a document from HTML to DOCX using Pandoc:
$ pandoc -s document.html -o document.docx
This command converts an HTML file to a DOCX (Microsoft Word) file using Pandoc. This is useful for web-based documents that need to be converted to a word processing format.
- Convert DOCX to PDF: Use Pandoc to convert a DOCX document to a PDF format.
Convert a document from DOCX to PDF using Pandoc:
$ pandoc -s document.docx -o document.pdf
This command converts a DOCX (Microsoft Word) file to a PDF file using Pandoc.
Conclusion
Converting documents between LibreOffice and Microsoft Office file formats on Linux can be efficiently accomplished using various methods. Whether you prefer using a graphical interface or command-line tools, there are solutions available to meet your needs. By following the steps outlined in this guide, you can ensure your documents are compatible across different software environments, enhancing accessibility and collaboration.