# NOT RUN {
library(magrittr)
file1 <- tempfile(fileext = ".docx")
file2 <- tempfile(fileext = ".docx")
file3 <- tempfile(fileext = ".docx")
read_docx() %>%
body_add_par("hello world 1", style = "Normal") %>%
print(target = file1)
read_docx() %>%
body_add_par("hello world 2", style = "Normal") %>%
print(target = file2)
read_docx(path = file1) %>%
body_add_break() %>%
body_add_docx(src = file2) %>%
print(target = file3)
# }
Run the code above in your browser using DataCamp Workspace