Learn R Programming

R2PPT (version 2.2.0)

PPT.Close: Close a PowerPoint presentation

Description

Closes a PowerPoint presentation.

Usage

PPT.Close(ppt)

Arguments

ppt

Required list of COM objects as initialised by PPT.Init. See example.

Value

ppt

Invisibly returns a list of COM objects.

Warning

You must save the returned list of COM objects initialised with PPT.Init to an R object. See the example.

References

See https://github.com/omegahat/RDCOMClient for more details on RDCOMClient and https://github.com/waynegitshell/R2PPT/ for R2PPT source code.

See Also

PPT.Init,PPT.SaveAs,PPT.AddTitleSlide,PPT.AddTextSlide, PPT.AddTitleOnlySlide,PPT.Present,PPT.ApplyTemplate,PPT.AddGraphicstoSlide

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
#Example of generating a presentation without making it visible (can be a lot quicker!).
myPres<-PPT.Init(visible=FALSE)
myPres<-PPT.AddTitleSlide(myPres,title="Title Slide",subtitle="Subtitle here")
myPres<-PPT.AddTitleOnlySlide(myPres,title="Title Only",title.fontsize=40,title.font="Arial")
myPres<-PPT.AddTextSlide(myPres,title="Text Slide",text="Text1 \rText2 \rText3",text.font="Arial")
myPres<-PPT.SaveAs(myPres,file=paste(getwd(),"test R2PPT Pres.ppt",sep="/"))
myPres<-PPT.Close(myPres)
rm(myPres)

### Open presentation
myPres<-PPT.Open(file=paste(getwd(),"test R2PPT Pres.ppt",sep="/"))
myPres<-PPT.Present(myPres)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab