M
Mogur
Hello all,
I am having problems accessing a Chart object from C#. I guess this is
related to my project's configuration...
I am developing a PowerPoint Add-In using Visual Studio 2008 and C#. The
Add-in inspects the slides of the current presentation when asking to do so,
and access to different properties of their shapes.
And I wanted to access to the properties of the graph the user has
created. I have managed to get a Shape reference that, being a Placeholder,
has a chart (the HasChart property is msoTrue, and the contained object of
the placeholder is a msoChart).
However, I cannot access to the Shape's Chart property. The simple access
to the Chart property of my shape generates a compiler error.
It is quite a bit frustrating because I know that the chart is there: I
could access to its properties from VB (in other different project) and I can
even see it while debugging the project in C#!!! The inspection of the object
properties at debug time shows me the Chart property and all its fields.
I guess this is something related to my project configuration, but I have
no clue about what I am doing wrong.
I am using
using PowerPoint = Microsoft.Office.Interop.PowerPoint
using Excel = Microsoft.Office.Interop.Excel
and my project references among others:
Microsoft.Office.Interop.Excel 12.0
Microsoft.Office.Interop.PowerPoint 12.0
Microsoft.Office.Tools.Common.v9.0
Microsoft.Office.Tools.v9.0
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
office 12.0.0.0
Thank you in advance!
I am having problems accessing a Chart object from C#. I guess this is
related to my project's configuration...
I am developing a PowerPoint Add-In using Visual Studio 2008 and C#. The
Add-in inspects the slides of the current presentation when asking to do so,
and access to different properties of their shapes.
And I wanted to access to the properties of the graph the user has
created. I have managed to get a Shape reference that, being a Placeholder,
has a chart (the HasChart property is msoTrue, and the contained object of
the placeholder is a msoChart).
However, I cannot access to the Shape's Chart property. The simple access
to the Chart property of my shape generates a compiler error.
It is quite a bit frustrating because I know that the chart is there: I
could access to its properties from VB (in other different project) and I can
even see it while debugging the project in C#!!! The inspection of the object
properties at debug time shows me the Chart property and all its fields.
I guess this is something related to my project configuration, but I have
no clue about what I am doing wrong.
I am using
using PowerPoint = Microsoft.Office.Interop.PowerPoint
using Excel = Microsoft.Office.Interop.Excel
and my project references among others:
Microsoft.Office.Interop.Excel 12.0
Microsoft.Office.Interop.PowerPoint 12.0
Microsoft.Office.Tools.Common.v9.0
Microsoft.Office.Tools.v9.0
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
office 12.0.0.0
Thank you in advance!