getMsoChartType: Get the ChartType of a msoChart object

Description Usage Arguments Value Author(s) Examples

Description

If the msoChart is a pie chart, then this function will tell its formal chart type:
xlPie
5

Usage

1

Arguments

oChart

msoChart object (COMIDispatch class)

Value

If the ChartType is valid, then a named numeric is returned. If no valid ChartType can be found, returns NULL.

Author(s)

Yiying Wang, wangy@aetna.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
ppt <- RDCOMClient::COMCreate("Powerpoint.Application")
pres <- ppt$Presentations()$Open(<some ppt file>)
slide <- pres$Slides(2)  # the 2nd slide
shape <- slide$Shapes(3)  # the 3rd shape
if (shape[['HasChart']] == -1) {  # if the shape contains msoChart
    chart <- shape[['Chart']]
    getMsoChartType(chart)
}
## End(Not run)

madlogos/aseshms documentation built on May 21, 2019, 11:03 a.m.