Method RemoveChart
RemoveChart(WordDocument, ChartRef)
Removes a chart: its drawing, its relationship, its part and what only the part used (its embedded workbook, its style and colour parts).
public static DocumentEdit RemoveChart(this WordDocument document, ChartRef chart)
Parameters
documentWordDocumentThe document that holds the chart.
chartChartRefThe chart.
Returns
- DocumentEdit
The edit; After is where the chart was.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The chart is not in
document.