Closed lrtai closed 7 years ago
I can't reproduce the issue, so you are probably using an old version.
> library(ReporteRs)
> target_file <- tempfile(fileext = ".docx")
> template <- system.file(package = "ReporteRs", "templates/bookmark_example.docx" ) # template example
> doc <- docx( template = template )
> doc <- addPlot( doc, fun = function() barplot( 1:6, col = 2:7) )
> list_bookmarks(doc)
[1] "PLOT" "DATA" "AUTHOR" "REVIEWER"
> doc <- deleteBookmark(doc, "PLOT")
> list_bookmarks(doc)
[1] "DATA" "AUTHOR" "REVIEWER"
>
Dear, Thank you very much for your help!
When I use addPlot to replace a bookmark PLOT with a ggplot, the bookmark is still in the docx after use writeDoc . I want to delete the bookmark PLOT after the plot is exactly inserted into the posiotion of PLOT ,but the function deleteBookmark is not working,and the error is NullPointerException.How can I solve this? Looking forward for the solution.