File size of RMarkdown Docx output increases when opened with Word

RMarkdown and Pandoc ironically seem to handle the DOCX format better than Word, because
RMarkdown's DOCX (Word) output files tend to be roughly half the size or even less as long as I don't open and save them again with Word (Microsoft). This increase is an issue with Word, but I would be very grateful in case there is anyone here who knows a way to avoid it.

I don't think they're handling the format better - they are just providing Word output that is only compatible with earlier versions of Word. So certain features are missing; providing for them adds file bulk. The Word document will be generated in compatability mode, and saving it in the newer format inflates the file size. I can't see any way around this issue. Usually it is not a problem, unless space is at a premium, but there can be complications if you are going to use new Word features on Pandoc output. Not insurmountable though.

Further information available at My document title says [Compatibility Mode] - Microsoft Support.

2 Likes

Thanks a lot, this was the information I was lacking.

The generation of output by Pandoc/RMarkdown mainly compatible with earlier versions of Word is actually a nice feature and not a bug.
I only need the DOCX output for collaboration and personally favor other output formats.

This topic was automatically closed 7 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.