-8

I want to convert a LibreOffice document to an MSWord document but I haven't found any tool for the conversion.

Does anyone know how to do this?

2

2 Answers 2

1

There's a quite useful tool to convert .odt files (assuming your goal is converting .odt instead of .ods to .docx) - it's called LibreOffice. LO has a command line interface, allowing for file conversions without opening the .odt file in the LO GUI.

Here's an extract showing the required command line parameter `--convert-to`` (for LibreOffice 5.1.6):

$ soffice -h
LibreOffice 5.1.6.2 10m0(Build:2)

Usage: soffice [options] [documents...]

Options:

(...) 

--convert-to output_file_extension[:output_filter_name[:output_filter_options]] [--outdir output_dir] files
      Batch convert files (implies --headless).
      If --outdir is not specified then current working dir is used as output_dir.
      Eg. --convert-to pdf *.doc
          --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc
          --convert-to "html:XHTML Writer File:UTF8" *.doc
          --convert-to "txt:Text (encoded):UTF8" *.doc

(...)

Remaining arguments will be treated as filenames or URLs of documents to open.

Just use docx as output filter name.

So,

soffice --convert-to docx file.odt

would convert the file file.odt to file.docx (the parameter --headless isn't required any more).

Important: the command line command works only if there's no other LO instance running. So, make sure to exit LO before issuing the command.

1

You can do it from Libre Office. When you do a Save-As, there are only 2 options. All formats or ODF. Only when you click on All formats, does it populate the dropdownbox with all the format.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .