![]() |
Chart to PPT
Hello,
How I could Loop thru the chart sheeets in the activeworkbook and copy all charts to seperate slides in powepoint and centre align the charts in the slides thanks |
Chart to PPT
You can start he
http://exceltips.vitalnews.com/Pages...erPoint .html "Abdul" wrote: Hello, How I could Loop thru the chart sheeets in the activeworkbook and copy all charts to seperate slides in powepoint and centre align the charts in the slides thanks |
Chart to PPT
I think I got this code from Jon Peltier's website, but I cannot find the
link to post... so here's the code... 'Pastes Each Embedded Chart in the Active Worksheet into a New Slide in the Active Presentation 'This procedure copies each embedded chart in the active worksheet as a picture from an Excel worksheet, 'then pastes it into a new slide at the end of a PowerPoint presentation. Sub ChartsToPresentation() ' Set a VBE reference to Microsoft PowerPoint Object Library Dim PPApp As PowerPoint.Application Dim PPPres As PowerPoint.Presentation Dim PPSlide As PowerPoint.Slide Dim PresentationFileName As Variant Dim SlideCount As Long Dim iCht As Integer ' Reference existing instance of PowerPoint Set PPApp = GetObject(, "Powerpoint.Application") ' Reference active presentation Set PPPres = PPApp.ActivePresentation PPApp.ActiveWindow.ViewType = ppViewSlide For iCht = 1 To ActiveSheet.ChartObjects.Count ' copy chart as a picture ActiveSheet.ChartObjects(iCht).Chart.CopyPicture _ Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture ' Add a new slide and paste in the chart SlideCount = PPPres.Slides.Count Set PPSlide = PPPres.Slides.Add(SlideCount + 1, ppLayoutBlank) PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex With PPSlide ' paste and select the chart picture .Shapes.Paste.Select ' align the chart PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True End With Next ' Clean up Set PPSlide = Nothing Set PPPres = Nothing Set PPApp = Nothing End Sub "Abdul" wrote in message oups.com... Hello, How I could Loop thru the chart sheeets in the activeworkbook and copy all charts to seperate slides in powepoint and centre align the charts in the slides thanks |
Chart to PPT
Finally found the correct links...
Both are on Jon Peltier's website: Paste Each Embedded Chart in the Active Worksheet into a New Slide in the Active Presentation http://peltiertech.com/Excel/XL_PPT.html#chartsslides Paste Each Embedded Chart in the Active Worksheet into a New Slide in the Active Presentation, using the Chart Title as the Slide Title http://peltiertech.com/Excel/XL_PPT....tstitlesslides ] "Abdul" wrote in message oups.com... Hello, How I could Loop thru the chart sheeets in the activeworkbook and copy all charts to seperate slides in powepoint and centre align the charts in the slides thanks |
All times are GMT +1. The time now is 09:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com