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

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
Thanks for the response.
There is no "Update" method for the Presentation object, Slide object or
Chart object.
 
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.
 
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.
 
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
================================================
 
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
================================================
 
Back
Top