Can´t preview in Open Office Writer, only in MS Word

I have both MS Word and Open Office Writer (actually Libre Office) installed. I´ve been using RMarkdown to knit docx format, without problems. My question is: when I switch to generate ODT format, it keeps using MS Word for previewing the generated ODT. I couldn't find where to change this behaviour. I´ve already checked that the ".odt" extension is handled by Openoffice. Thanks for any help.

Try changing the default behaviour in the windows.

1 Like

Thank you for your suggestion. I´m not sure if I understand what you meam by "Try changing the default behaviour for selecting open office in the windows.", because, as I said, I´ve checked that open office is the default application to handle the ".odt" extension. Is there any other behaviour to change? By the way, I´m using Windows 10 Pro, R version 3.6.3, RStudio Version 1.1.463, Rmarkdown version 2.3, knitr version 1.29. Here is a sample .Rmd:

title: "Untitled"
author: "Your Name"
date: "12 de setembro de 2020"

knitr::opts_chunk$set(echo = TRUE)

R Markdown

Although this file knits correctly to ".odt", it opens, for previewing,
in MS Word. I would expect it to preview in Open Office. What am I missing?

Does double-clicking an odt file opens it in open office?

(I have corrected my previous post).

Yes, definitely. I´ve just double checked with the odt generated from the .Rmd above.
I believe there must be a place where rmarkdow does a "system(word....)" but it
should be (I believe!) a "system(writer...)", but I have no clue how to change it...

I confirmed this behavior. I have never activated Word on my system, though it is available. If I knit to odt, the preview opens in Word, which then wants me to accept the license agreement, etc. All odt files open in OpenOffice when double clicked.

1 Like

Have you tried right-clicking the odt file (output) and changing its association from there?

No, I`ve changed the extension association through the configurations menu.When I right click over an odt file, then select "Open", it opens with Open Office. If I select "Open with", both Open Office and Word appear as options, but Open Office is listed first.

Furthermore, right clicking and selecting "properties", shows the association with "open office":


I think this is a behaviour of RStudio IDE that treats odt, rtf and docx the same.

I moved this post in the RStudio IDE category.
You can also open an issue in the rstudio github repo to ask for a way to configure this behaviour.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.