View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default How can I export a chart as a jpg/tif?

Hi,

As Jon says you need VBA code to use the export method of a chart.

Here is the simplest set of steps to do that.

Select your chart object or sheet
ALT+F11 (takes you to VBE)
CTRL+G (open immediate window)
Enter the following syntax, changing path, filename and filter type as
required.

activechart.Export "C:\temp\mychart.tif","tif"

Press Return to execute command.

Here is an addin that provides export functionality
http://www.andypope.info/vba/gex.htm

Cheers
Andy


Tony B wrote:
Thanks John,
Unfortunately I cannot find the option in VBA to export the charts as a
gif/tif/png (though I admit I've never used VBA!).
I clicked on the developer tab, opened VBA, then right-clicked on one of the
charts in the left-hand pane, which opened a dialog box with the export
option. However, the only format I seem able to export as is the .cls
extension.
As you say, it may depend on my computer's setting, or maybe I need to know
more about VBA to do it.
Thanks anyway- I appreciate your time in replying.
Best wishes, Tony.

"Jon Peltier" wrote:


In VBA the Chart object has an Export method, which can convert a chart to a
variety of raster formats. I would suggest not using JPG; depending on your
computer's settings you should also be able to export GIF, PNG, or TIF. Note
that the resolution of the image will match the screen resolution.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tony B" <Tony wrote in message
...

Hi there,

I regularly produce charts/graphs in Excel (2007), but need to export them
as a tiff or jpeg so that I can submit them to a scientific journal for
publishing (most publishers prefer images in this format).

Copying and pasting does not work, or if it does, the resolution is poor
or
data is missing.

A previous posting on here had a response that mentioned an 'export'
option,
but I cannot locate this.

I'd be really grateful for any advice.

Thanks in advance,

Tony.