Hi, I am using below code to generate a simple PPTX file using Officer Package:
if(!require("officer")) install.packages("officer")
library(officer)
doc = read_pptx()
doc = add_slide(doc, "Title Only", master="Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Example title")
## write the document
print(doc, "C:/PPT_Test.pptx" )
This code is generating PPTX file in C drive. but when I am opening this file I am getting below message:
PPT found a problem with content in C:\PPT_Test.PPTX. Powerpoint can attempt to repair the presentation.
Once I click on Repair, it shown another message:
PowerPoint couldnot read some content and removed it. Once I click OK, it open the ppt file.
How can I get rid of this message.
When I was creating PPTX file from Reporters package, I was not getting any such message and PPTX file was opening without any issue.
Thanks
Rajneesh