|
Prev: How do I set up page turn slide transition?
Next: how do I reset a animated page in Powerpoint after transition?
From: wschiro on 13 May 2008 19:51 If you are using PowerPoint 2007 you might want to use OpenXML to create your charts. http://openxmldeveloper.com/ Sorry, I can't be of more help. I am looking into this myself so I can dynamically create Excel charts in PowerPoint. "Steve Rindsberg" wrote: > In article <0CE47F91-373D-45A2-B3C6-0F31BB9A1975(a)microsoft.com>, Robert2b wrote: > > Steve, > > > > It sounds like you are sick of threads about what can and cannot be done > > through VBA to modify Powerpoint 2007 charts. So I apologize ahead of time > > for being so green. > > Thanks for saying so, but no need to apologize in advance. Really, I'm sick of > Stupid Software Tricks, not questions from users who are the victims of the SSTs. > > And MS' releasing Office with charts in their current state certainly deserves the > SST label. > > > VBA is relatively new to me and the threads and documentation are very > > confusing. What is the purpose of the chart object in Powerpoint and the > > ChartWizard, SetSourceData, ChartData,ChartTitle, ChartType and PlotBy > > constructs? It there is definitive reference for their use? > > Sounds like you've been poking around in the object browser. ;-) > There's quite a bit of stuff in there that makes ya go "AHA! That's just what I'm > looking for." But then you find that the top-level object isn't implemented. > There's where you want to be, but you can't get there from here. > > I suspect a lot of the under-the-hood work is incomplete, so MS decided not to > expose it yet. My guess? Not until the next version of Office. I hope I'm > wrong. > > > Some of my confusion also arises because if you check the chart data for the > > chart output created by the following Excel macro code, you will find that > > cells A2 and B2 are changed on the fly. I recognize this may be trivial, but > > how would I access the chart title, axis and other constructs in analogous > > manner? > > In Excel, try the Macro Recorder (though it seems that's pretty well trashed when > it comes to charts too ... sigh). > > > > > > Sub ExcelToNewPowerPoint2() > > > > Dim objPPT As PowerPoint.Application > > Dim objPres As PowerPoint.Presentation > > Dim objSlide As PowerPoint.Slide > > Dim objCustomLayout As PowerPoint.CustomLayout > > Dim objShape As PowerPoint.Shape > > Dim strText As String > > > > Set objPPT = CreateObject("Powerpoint.Application") > > Set objPres = objPPT.Presentations.Add > > Set objCustomLayout = objPres.SlideMaster.CustomLayouts.Item(1) > > > > Set objSlide = objPres.Slides.AddSlide(1, objCustomLayout) > > > > objSlide.Layout = PowerPoint.PpSlideLayout.ppLayoutText > > > > Set MSChart1 = objPres.Slides(1).Shapes.AddChart(xlXYScatterLines, 100, 100, > > 500, 400) > > > > 'Change the contents of the data used by the PowerPoint Chart > > > > ActiveWorkbook.Sheets("Sheet1").Range("A2") = 23 > > ActiveWorkbook.Sheets("Sheet1").Range("A1").Activate > > ActiveCell.Offset(1, 1).FormulaR1C1 = "=[ExcelPPT.xlsm]Sheet5!RC[1]" > > ActiveWindow.Close > > > > End Sub > > ------------------------------------------------- > > "Steve Rindsberg" wrote: > > > > > In article <0940420A-A44C-4B83-A494-C3CE41D397BE(a)microsoft.com>, Jclark wrote: > > > > I'm currently building custom UI in PowerPoint that links to VBA macros etc. > > > > My questions is regarding the default charts in PowerPoint 2007. > > > > How do you access charts and the elements of them through VBA within > > > > PowerPoint? > > > > > > This is one of those "I'm glad to have the answer but only because it means I > > > can stop banging my head on the desk over this" kind of answers. > > > > > > You can't. > > > > > > How's that for "short but not sweet"? :-( > > > > > > ----------------------------------------- > > > Steve Rindsberg, PPT MVP > > > PPT FAQ: www.pptfaq.com > > > PPTools: www.pptools.com > > > ================================================ > > > > > > > > > > > > > ----------------------------------------- > Steve Rindsberg, PPT MVP > PPT FAQ: www.pptfaq.com > PPTools: www.pptools.com > ================================================ > > > |