R/PPT.SaveAs.R

"PPT.SaveAs" <-function(ppt,file=stop("filename must be specified.")){

if (ppt$method == "rcom") {  

	if(!comIsValidHandle(ppt$ppt))   stop("Invalid handle for powerpoint application")
	if(!comIsValidHandle(ppt$pres))  stop("Invalid handle for powerpoint presentation")

}

file<-PPT.getAbsolutePath(file)
file<-gsub("/","\\\\",as.character(file)) #character should be \\\\ and not / some compatability issues in rcom. 

ppt$pres$SaveAs(file)
#comInvoke(ppt$pres,"SaveAs",gsub("/","\\\\",as.character(file)))

return(invisible(ppt))
}

Try the R2PPT package in your browser

Any scripts or data that you put into this service are public.

R2PPT documentation built on May 30, 2017, 7:32 a.m.