3

I just want to know if there is a way to EDIT TEXT of an existing powerpoint presentation with officer package in R.

The base presentation must be edited with updated values monthly, while the images inside remains the same. I know I can locate the attributes of that text values with functions like layout_summary(), layout_properties(), slide_summary(), etc., but can't get a way to edit its values.

Thanks in advance,

1 Answers1

2

I solved this problem by creating a version of the powerpoint slides that contains the images and layout that I want, and any text that stays the same between each version (but does not include any of the text that needs to be edited). Then read that template version in and add text to it using any of the ph_with functions. This allows you to keep images an formatting, and control text.

clairekelley
  • 427
  • 2
  • 4
  • 11
  • Do you have an example of a function to insert text in that template? Thanks – Lucas Mignone Jun 11 '20 at 15:55
  • ph_with(location = ph_location_label(ph_label = "label", value = "value"). Pass the "location" and "value" in a data frame. If you want to pass images as value (status icons in my case) then use -> ph_with(location = ph_location_label(ph_label = "label", external_img(src="imagelocation"). You need to find the label name inside the "Selection Pane" – Jai Apr 07 '21 at 20:45
  • Sorry - above comment should read 'Pass the "label", "value", and "imagelocation" in a data frame' – Jai Apr 07 '21 at 21:47