Double Clicking Chart object at PP slide clears chart's DataSheet

G

Guest

Hi,

I'm building a PP presentation in C#,
working with "VS2003" and "PowerPoint 11 Object Library".
When i double click a chart in a slide in the built presentation,
the chart returns to be a basic chart(like when you add a new chart), and the
chart's data sheet returns to default values.
Any idea how to solve this problem?
 
A

Andy Pope

Hi,

Did you use the .Update method before closing the object in your code?
Sorry I don't know the C# syntax but it can not be that different from
VB(A).

Cheers
Andy
 
G

Guest

Thanks for the response.
There is no "Update" method for the Presentation object, Slide object or
Chart object.
 
S

Steve Rindsberg

Thanks for the response.
There is no "Update" method for the Presentation object, Slide object or
Chart object.

It's not clear what type of charts these are, but if they're MSGraph objects, the
MSGraph Application object has an Update method. Call that just before calling Quit
and you should be in good shape.
 
G

Guest

The Chart's namespace is "Microsoft.Office.Interop.Graph.Chart".
Here is how I get the chart from the slide:

Microsoft.Office.Interop.Graph.Chart oChart =
(Microsoft.Office.Interop.Graph.Chart)ppSlide.Shapes[slideSet.ShapeIndex].OLEFormat.Object;

The "Chart" object has no "Update" method.
The data is inserted to the Chart, but the problem it disappears when
double clicking the Chart at the slide.
 
A

Andy Pope

Have you tried

oChart.Application.Update

Cheers
Andy
The Chart's namespace is "Microsoft.Office.Interop.Graph.Chart".
Here is how I get the chart from the slide:

Microsoft.Office.Interop.Graph.Chart oChart =
(Microsoft.Office.Interop.Graph.Chart)ppSlide.Shapes[slideSet.ShapeIndex].OLEFormat.Object;

The "Chart" object has no "Update" method.
The data is inserted to the Chart, but the problem it disappears when
double clicking the Chart at the slide.

:

It's not clear what type of charts these are, but if they're MSGraph objects, the
MSGraph Application object has an Update method. Call that just before calling Quit
and you should be in good shape.


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
G

Guest

Problem solved.
The code line is:
"oChart.Application.Update();"

Thank you Andy and Steve.


Andy Pope said:
Have you tried

oChart.Application.Update

Cheers
Andy
The Chart's namespace is "Microsoft.Office.Interop.Graph.Chart".
Here is how I get the chart from the slide:

Microsoft.Office.Interop.Graph.Chart oChart =
(Microsoft.Office.Interop.Graph.Chart)ppSlide.Shapes[slideSet.ShapeIndex].OLEFormat.Object;

The "Chart" object has no "Update" method.
The data is inserted to the Chart, but the problem it disappears when
double clicking the Chart at the slide.

:

Thanks for the response.
There is no "Update" method for the Presentation object, Slide object or
Chart object.

It's not clear what type of charts these are, but if they're MSGraph objects, the
MSGraph Application object has an Update method. Call that just before calling Quit
and you should be in good shape.


:


Hi,

Did you use the .Update method before closing the object in your code?
Sorry I don't know the C# syntax but it can not be that different from
VB(A).

Cheers
Andy

Sonic wrote:

Hi,

I'm building a PP presentation in C#,
working with "VS2003" and "PowerPoint 11 Object Library".
When i double click a chart in a slide in the built presentation,
the chart returns to be a basic chart(like when you add a new chart), and the
chart's data sheet returns to default values.
Any idea how to solve this problem?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top