# NOT RUN {
library(magrittr)
doc <- read_docx() %>%
body_add_par("A title", style = "heading 1") %>%
body_add_par("Hello world!", style = "Normal") %>%
body_add_par("centered text", style = "centered")
print(doc, target = "body_add_par.docx" )
# }
Run the code above in your browser using DataCamp Workspace