+ Reply to Thread
Results 1 to 3 of 3

Excel table paste special EMF to PPT, need some help

  1. #1
    Registered User
    Join Date
    09-09-2023
    Location
    New York
    MS-Off Ver
    MS 365
    Posts
    2

    Excel table paste special EMF to PPT, need some help

    Im trying to execute a simple copy and paste to PPT from EXCEL, open a ppt file then just take the copy of the table to an existing PPT file. im stuck at one are, doesnt paste. Can anyone help, using ms office 365

    Sub PasteEXCELtoPPT()

    Dim pptApp As Object
    Dim pptPresentation As Object
    Dim pptSlide As Object
    Dim pptShape As Object
    Dim excelRange As Range

    Set excelRange = ThisWorkbook.Sheets("Dashboard").Range("A4:R25")

    On Error Resume Next
    Set pptApp = GetObject(, "PowerPoint.Application")
    On Error GoTo 0

    If pptApp Is Nothing Then
    Set pptApp = CreateObject("PowerPoint.Application")
    pptApp.Visible = True
    End If

    Set pptPresentation = pptApp.Presentations.Add

    excelRange.Copy

    'IT BREAKS HERE

    pptSlide.Shapes.PasteSpecial ppPasteEnhancedMetafile

    end sub


    it doesnt paste

    Thank you for your help and insight

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,534

    Re: Excel table paste special EMF to PPT, need some help

    Missing in your code was the addition of a slide to the presentation.

    When you apply late binding to an application you must take care to define the constants that are needed to perform some actions. That's why I added definitions of two constants in the code, which will be used later in the procedure.
    Please Login or Register  to view this content.
    Artik

  3. #3
    Registered User
    Join Date
    09-09-2023
    Location
    New York
    MS-Off Ver
    MS 365
    Posts
    2

    Re: Excel table paste special EMF to PPT, need some help

    thank you!!!

+ 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. paste special in a table with filtered data
    By PaulLag in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-15-2022, 03:27 AM
  2. Replies: 8
    Last Post: 08-18-2016, 06:41 AM
  3. disable copy/cut/paste/paste special in excel 2010
    By Alina Loredana in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2014, 06:43 PM
  4. Replies: 1
    Last Post: 12-05-2012, 11:37 AM
  5. Replies: 1
    Last Post: 10-01-2012, 11:11 PM
  6. [SOLVED] Excel 2002 - Can only paste values, wont let me paste special
    By MK_Chopper_P in forum Excel General
    Replies: 2
    Last Post: 07-12-2012, 02:22 AM
  7. In Excel: add a Paste-Special Option to paste IN REVERSE ORDER.
    By stan-the-man in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-14-2006, 03:15 PM

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