# NOT RUN {
library(magrittr)
img.file <- file.path( R.home("doc"), "html", "logo.jpg" )
bl <- block_list(
fpar(ftext("hello", shortcuts$fp_bold())),
fpar(
ftext("hello", shortcuts$fp_bold()),
stext(" world", "strong"),
external_img(src = img.file, height = 1.06, width = 1.39)
)
)
x <- read_docx() %>%
body_add_blocks( blocks = bl ) %>%
print(target = tempfile(fileext = ".docx"))
# }
Run the code above in your browser using DataCamp Workspace