I'm an avid user of the Reporters and Officer packages and currently trying to transition to Officer for a Powerpoint workflow. I'm using a slide template that includes slide number placeholders in the master.
When using Reporters, I am able to add the slide numbers using doc <-addPageNumber( doc )
and the page numbers reflect the current position each slide has in the deck. I am looking for the same functionality in Officer, and looking for the slide numbers to update appropriately when I move the slides.
When I use ph_with_text(doc, type = "sldNum", str = "slide 1")
, I am required to supply a string with a static number or text, and it does not update according to where the slide appears in the deck. For example, if I know my slide will be slide 2, I can enter str = "2"
, but then the slide number will read as 2 even if I move that slide to the slide 3 position in the presentation.
I tried leaving the string empty with str = ""
or with ph_empty(type= "sldNum")
but these result in the string "Slide Number" appearing on the slide.
Any help or pointers in the right direction would be appreciated!