You can do this with addSection :
library(ReporteRs) doc = docx() doc = addSection( doc, landscape = T ) doc = addFlexTable( doc, FlexTable( mtcars) ) doc = addSection( doc, landscape = F ) writeDoc( doc, "test.docx")
Another solution would be to create an empty Word document with landscape orientation and then use it as a template:
library(ReporteRs) doc = docx(template = "your_landscape_doc.docx") doc = addFlexTable( doc, FlexTable( mtcars) ) writeDoc( doc, "test.docx")
source share