Currently I am to copy and paste charts to an existing PowerPoint template, but now the Excel has 3 dynamic pivot tables on seperate tabs that are not getting copied over. How can I include these in the VBA code to paste them in the PowerPoint?

See code below

Best Regards,
bgsmith315

Option Explicit

Sub NewSlides_OldPowerPoint()

Dim ppt As PowerPoint.Application
Set ppt = GetObject(, "powerpoint.application")

Dim ppres As PowerPoint.Presentation
Set ppres = ppt.ActivePresentation

Dim pslide As PowerPoint.Slide
Set pslide = ppres.Slides.Add(ppres.Slides.Count + 1, ppLayoutBlank)

Dim wb As Workbook
Set wb = ActiveWorkbook

wb.Sheets(2).Select

Dim ws As Worksheet, mychart As ChartObject

For Each ws In wb.Worksheets
ws.Select

For Each mychart In ActiveSheet.ChartObjects
mychart.Copy
pslide.Shapes.PasteSpecial (ppPasteBitmap)
Set pslide = ppres.Slides.Add(ppres.Slides.Count + 1, ppLayoutBlank)

Next

Next


End Sub