Powerpoint 2007 – how to retrieve chart details programatically?


Does anyone have idea about how to retrieve the chart details from the powerpoint 2007 presentation?

office 2010 supports PowerPoint.Chart type but the same is not available in 2007 version.

I tried to use shape.OLEFormat.Object but it is failing saying “this property applies for only OLE objects”.

please suggest.

Regards, Sujasree

Hello Sujasree,Yes, PowerPoint 2007 object model does not expose a property like chart. However, we could use Microsoft.Office.Interop.Graph class to convert a Shape object to “Chart”. For this, you will get an answer from this thread:

Hi Bessie,Thanks for the reply. Both the threads you mentioned tell me how to add a chart to the powerpoint  presentation.But i dont want to add a chart, all I want is to fetch the information about the chart (like axis info, legend info, title etc) …Please let me know if I am not understanding what you said.Regards, Sujasree

Also, the thread