ReporteRs (version 0.6.6)

addPageNumber.pptx: Insert a page number shape into a document pptx object

Description

Insert a page number shape into the current slide of a pptx object.

Usage

# S3 method for pptx
addPageNumber(doc, value, ...)

Arguments

doc

pptx object

value

character value to add into the page number shape of the current slide. optionnal. If missing current slide number will be used.

...

further arguments, not used.

Value

a pptx document object

See Also

addPageNumber, addDate.pptx

Examples

Run this code
# NOT RUN {
#START_TAG_TEST
# Create a new document
doc = pptx( title = "title" )

# add a slide with layout "Title Slide"
doc = addSlide( doc, slide.layout = "Title Slide" )
doc = addTitle( doc, "Presentation title" ) #set the main title
#set the sub-title
doc = addSubtitle( doc , "This document is generated with ReporteRs.")

## add a page number on the current slide
doc = addPageNumber( doc )

doc = addSlide( doc, slide.layout = "Title and Content" )
## add a page number on the current slide but not the default text (slide number)
doc = addPageNumber( doc, value = "Page number text")

# Write the object in file "presentation.pptx"
writeDoc( doc, "addPageNumber_example.pptx" )
#STOP_TAG_TEST
# }

Run the code above in your browser using DataCamp Workspace