Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Lisa,
I was working on this just the other day with some success. The following code worked for me. You need to ensure that the appropriate references are ticked off in the visual basic editor. Tools - references The following worked fine in XP. Run the code from the active worksheet with your graphs in it. I have not investigated pasting these as links prehaps someone else will modify the code to offer that level of functionality. Option Explicit Sub GraphsToPowerpoint() Dim PPApp As Powerpoint.Application Dim PPPres As Powerpoint.Presentation Dim PPSlide As Powerpoint.Slide Dim SlideCount As Long Dim x As Integer Set PPApp = CreateObject("Powerpoint.Application.8") Set PPPres = PPApp.Presentations.Add Set PPSlide = PPPres.Slides.Add(Index:=1, Layout:=ppLayoutText) For x = 1 To ActiveSheet.ChartObjects.count ActiveSheet.ChartObjects(x).Chart.CopyPicture _ Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture SlideCount = PPPres.Slides.count Set PPSlide = PPPres.Slides.Add(SlideCount + 1, ppLayoutBlank) PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex With PPSlide .Shapes.Paste.Select PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True End With Next With PPPres .SaveAs "C:\Temp\Name_of_presentation.ppt" .Close End With PPApp.Quit Set PPSlide = Nothing Set PPPres = Nothing Set PPApp = Nothing HTH Chris. End Sub "Lisa" wrote in message ... Hello: Can anyone hel me? I would like to take the graphs I've created in excel and export them to a powerpoint presentation. A graph per specific ppt slide. I would like the graphs to be automatically updated in the ppt presentation whenever I update the excel document. Thank you very much. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Export Excel tuncating leading zeros while export to excel from da | Setting up and Configuration of Excel | |||
Automatically update graphs | Charts and Charting in Excel | |||
embedded presentation graphs in excel don't update, tables do | Excel Worksheet Functions | |||
excel graphs won't update | Charts and Charting in Excel | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) |