+ Reply to Thread
Results 1 to 1 of 1

Macro to paste chart images to PowerPoint fails with Mac

  1. #1
    Forum Contributor
    Join Date
    07-01-2018
    Location
    Adelaide, South Australia
    MS-Off Ver
    Office 365, & Excel 2016 on windows 10, & 14.7 for mac, & Excel 2015 for mac
    Posts
    157

    Macro to paste chart images to PowerPoint fails with Mac

    I have created a tool for loading Excel charts to PowerPoint. The idea is to avoid external links so that presentations donít break when sent to other users.
    Any user can take an excel updater file, create some charts, record the locations of the target images in the PP presentation, and update the presentation whenever the data changes.
    The process involves listing the charts that are in excel by chartname (sheet1 ONLY),
    taking an image copy of the chart,
    checking that ID tags for the files match,
    pasting image into the open power point target, listed by slide number and shape name,
    and duplicating the size and position of the chart.
    A similar process is carried out for text boxes.

    This has worked well in windows, but the process breaks when I try to use in excel for Mac. Whenever it gets to the stage of pasting an image into Powerpoint I get Error 5, procedure call invalid. at this location
    Copy to clipboard
    PPO.Select
    PPSlide.Shapes.PasteSpecial ppPasteEnhancedMetafile
    Iíve tried varying the image file type, and tried some conditional compile code to use an apple script solution, but I canít get it to work. My latest was

    Copy to clipboard
    #If Mac Then
    ws.PasteSpecial Link:=False, DisplayAsIcon:=False, Format:=3
    ws.Shapes(ws.Shapes.Count).Copy
    PPO.Select
    AppleScriptTask "CopyPasteScript.applescript", "PastePowerpoint", ""

    #Else
    ' Paste the range
    PPO.Select
    PPSlide.Shapes.PasteSpecial ppPasteEnhancedMetafile
    #End If
    I don't really understand apple scripts. Is this even possible on a mac?
    Any help on this problem would be GREATLY appreciated.

    EDIT My example file does not seem to be loading. Here is the larger sub for chart transfer
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by truk2; 01-30-2020 at 01:33 AM. Reason: File failed to upload

+ 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 Excel Chart into PowerPoint
    By SFtdm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2018, 10:54 AM
  2. Help with Importing Images Macro for Powerpoint
    By Chriz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2017, 05:09 AM
  3. [SOLVED] macro fails when it is trying to paste
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 10-19-2016, 12:33 PM
  4. Paste Excel Chart into Powerpoint placeholder
    By jsunnb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2014, 01:53 PM
  5. Excel chart to paste it on powerpoint file
    By albert28 in forum Excel General
    Replies: 0
    Last Post: 04-21-2014, 03:45 AM
  6. Paste chart as jpeg/png into powerpoint
    By rishadjb in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 10-18-2013, 09:09 AM
  7. Replies: 4
    Last Post: 02-01-2013, 12:00 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