Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Honolulu, Hawaii, USA
    Posts
    63
    Thanks
    1
    Thanked 0 Times in 0 Posts

    can I create a jpg or gif from an Excel chart using VBA?

    Aloha all,
    I'm looking for a way to automate a process that is manual and tedious. The process: I select a range of cells surrounding an embedded chart in an Excel spreadsheet, copy, switch to a graphics app like Paint, paste, and save as a jpg. I have to do this several hundred times. Is there any way to Save As a jpg from within Excel? Or using VBA in another Office app?
    Mahalo for your suggestions,

    John Jacobson

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    I don't think there is a direct way to do this, but you can select the chart and use a line of code like:
    ActiveChart.Export "C:\MyPath\Chart.jpg"

    Steve

  3. #3
    3 Star Lounger
    Join Date
    Dec 2009
    Location
    Hartford, WI, USA
    Posts
    369
    Thanks
    147
    Thanked 62 Times in 37 Posts

    Oh YES, there is a MUCH easier way

    Download and install Gadwin PrintScreen. Scroll all the way down to the free version (last entry in the list).

    It does an IMHO marvelous job!
    Eike J Heinze
    What I am about
    SE Wisconsin

Posting Permissions

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