Convert org file to odt with Emacs

Just as we can convert .org file to .pdf in Emacs, we can also convert .org files to .odt format(Libre Office)


org to odt

Open up your Emacs config file and paste below code

(if (file-exists-p "/usr/bin/soffice")
  (setq org-export-odt-convert-processes
      "/usr/bin/soffice --headless --convert-to %f%x --outdir %d %i"
      org-export-odt-preferred-output-format "odt"
      org-export-odt-convert-process "/usr/bin/soffice")
(message "SOFFICE path not found"))

Now open any org file and type

M-x org-export-as-odt

This should convert an org file to odt.

Above code can also be downloaded from directly as emacs config file.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s