+ Reply to Thread
Results 1 to 5 of 5

Paste chart as jpeg/png into powerpoint

  1. #1
    Registered User
    Join Date
    07-18-2009
    Location
    Waterloo, Canada
    MS-Off Ver
    Excel 2020
    Posts
    20

    Paste chart as jpeg/png into powerpoint

    I am trying to paste a chart from my excel file to a ppt as a jpeg or png. I have the code to paste it as an object:

    to copy
    Please Login or Register  to view this content.

    to paste
    Please Login or Register  to view this content.
    How can I modify this to paste it as jpeg? I have tried recording a macro but it stops recording once I shift to the ppt window. Couldn't find anything on google.

    Thanks for your help.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Paste chart as jpeg/png into powerpoint

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-18-2009
    Location
    Waterloo, Canada
    MS-Off Ver
    Excel 2020
    Posts
    20

    Re: Paste chart as jpeg/png into powerpoint

    Yeah I tried that but kept giving me the same error. I found the solution however for whoever is interested. The problem is not in the paste command but in the copy command. When I copy it as a picture using "ActiveChart.CopyPicture" it can only be pasted as a metafile.

    To paste it as a jpeg or oleobject etc, it needs to copied as:

    ActiveChart.ChartArea.Copy
    Then the jpeg command you provided can be used without error.

  4. #4
    Registered User
    Join Date
    05-08-2007
    Location
    Sweden
    Posts
    1

    Re: Paste chart as jpeg/png into powerpoint

    This maybe quick and dirty but it works in Powerpoint 2013:

    'Sub to convert chart in Excel and paste into powerpoint:
    Please Login or Register  to view this content.
    Best Fredrik
    Last edited by ffa; 10-20-2013 at 11:01 AM. Reason: Comment in code must begin with a ' sign or a REM text. //Fredrik

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Paste chart as jpeg/png into powerpoint

    ffa,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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