I've got a macro building a powerpoint presentation from my excel spreadsheet. I really want the powerpoint to update when I save changes to excel (probably using link?) but I can't figure out the syntax. The section of code I have right now is:
'Loop through each chart in the Excel worksheet and paste them into the PowerPoint
For wsCount = 2 To (wsTotal - 3)
Set sht = Worksheets(wsCount)
'Add a new slide where we will paste the chart
newPowerPoint.ActivePresentation.Slides.Add newPowerPoint.ActivePresentation.Slides.count + 1, ppLayoutBlank
newPowerPoint.ActiveWindow.View.GotoSlide newPowerPoint.ActivePresentation.Slides.count
Set activeSlide = newPowerPoint.ActivePresentation.Slides(newPowerPoint.ActivePresentation.Slides.count)
'Copy the chart and paste it into the PowerPoint as a Metafile Picture
sht.Range("A1:O30").Copy
activeSlide.Shapes.PasteSpecial(DataType:=ppPasteMetafilePicture).Select
Thanks!
'Loop through each chart in the Excel worksheet and paste them into the PowerPoint
For wsCount = 2 To (wsTotal - 3)
Set sht = Worksheets(wsCount)
'Add a new slide where we will paste the chart
newPowerPoint.ActivePresentation.Slides.Add newPowerPoint.ActivePresentation.Slides.count + 1, ppLayoutBlank
newPowerPoint.ActiveWindow.View.GotoSlide newPowerPoint.ActivePresentation.Slides.count
Set activeSlide = newPowerPoint.ActivePresentation.Slides(newPowerPoint.ActivePresentation.Slides.count)
'Copy the chart and paste it into the PowerPoint as a Metafile Picture
sht.Range("A1:O30").Copy
activeSlide.Shapes.PasteSpecial(DataType:=ppPasteMetafilePicture).Select
Thanks!