+ Reply to Thread
Results 1 to 2 of 2

Copy and Paste different objects to PowerPoint

  1. #1
    Registered User
    Join Date
    07-24-2018
    Location
    USA
    MS-Off Ver
    365
    Posts
    2

    Copy and Paste different objects to PowerPoint

    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

  2. #2
    Registered User
    Join Date
    07-24-2018
    Location
    USA
    MS-Off Ver
    365
    Posts
    2

    Re: Copy and Paste different objects to PowerPoint

    Solved it myself

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy range in excel and paste in Powerpoint VBA
    By JeradAllan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2017, 08:49 AM
  2. Copy/Paste - remove objects
    By 007van in forum Excel General
    Replies: 2
    Last Post: 05-02-2016, 05:31 PM
  3. Loop copy paste from excel to powerpoint
    By lupingamon in forum PowerPoint Formatting & General
    Replies: 0
    Last Post: 07-02-2014, 09:41 AM
  4. Copy and Paste Range with Objects
    By iluxa99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2013, 08:48 PM
  5. VBA Copy/Paste to PowerPoint from Excel
    By boogie87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2011, 08:31 AM
  6. Copy/Paste Drawing Objects
    By arpaket in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2009, 07:28 PM
  7. Replies: 0
    Last Post: 03-03-2005, 11:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1