2

I am trying to create a .docx file in R using officeR package, and I want a piece of text to be underlined. Though fp_text offers the arguments to underline text, it does not seem to work. Any help is appreciated!

fpt = fp_text(color = "red", bold = TRUE, underlined = TRUE)
fpar_1 <- fpar( ftext("how are you", prop = fpt ), "?")
doc <- read_docx() %>% body_add_fpar(fpar_1)
print(doc, target = "body_add_fpar_1.docx" )
David Gohel
  • 9,180
  • 2
  • 16
  • 34
sgt
  • 21
  • 2

0 Answers0