We will consider the .docx to .odt conversion, but the syntax and steps are the same for other formats supported by LibreOffice.