Trying to add a chart to a Powerpoint presentation????

korcutt

New member
Joined
Mar 28, 2006
Messages
1
Programming Experience
10+
Howdy All,
I'm haveing a heck of a time trying (in VB.net) to add a chart to a powerpoint presentation that I'm build via code...

I'm looking at using the MSChart object, but I might consider the Office Web Components is neccessary.

I have no clue as to where even to begin... I can add a slide to the presentation no prblem, but once I do that what to I do???

I've add a OLEObject/MSChart" to the page, but can't seem to modify beyond the default chart type and chart data... I need to change the type and add specific data to the chart...

Here's where I gone so for, Which may be total wrong, please tell me!!!


Dim PP As PowerPoint.Application
Dim Pres As PowerPoint.Presentation

Pres.Slides.Item(
"Slide2").Select()
Pres.Slides.Item(
"Slide2").Copy()
Pres.Slides.Item(Pres.Slides.Count).Select()
PP.ActiveWindow.View.Paste()

intSlideIndex = Pres.Slides.Count
Pres.Slides.Item(intSlideIndex).Select()

PP.ActiveWindow.Selection.SlideRange.Shapes.AddOLEObject(50, 50, 500, 300, "MSGraph.Chart", , Core.MsoTriState.msoFalse, , , , Core.MsoTriState.msoCTrue).Select()


NOW WHAT?????


Thanks in advance,
Kevin Orcutt
Software Engineer
SAEC/kinetic vision
korcutt@saec-kv.com
 
Back
Top