# NOT RUN {
library(magrittr)
str1 <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " %>%
rep(10) %>% paste(collapse = "")
my_doc <- read_docx() %>%
# add a paragraph
body_add_par(value = str1, style = "Normal") %>%
# add a continuous section
body_end_section(continuous = TRUE) %>%
body_add_par(value = str1, style = "Normal") %>%
body_add_par(value = str1, style = "Normal") %>%
# preceding paragraph is on a new column
slip_in_column_break(pos = "before") %>%
# add a two columns continous section
body_end_section(colwidths = c(.6, .4),
space = .05, sep = FALSE, continuous = TRUE) %>%
body_add_par(value = str1, style = "Normal") %>%
# add a continuous section ... so far there is no break page
body_end_section(continuous = TRUE) %>%
body_add_par(value = str1, style = "Normal") %>%
body_default_section(landscape = TRUE, margins = c(top = 0.5, bottom = 0.5))
print(my_doc, target = "section.docx")
# }
Run the code above in your browser using DataLab