View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Webtechie Webtechie is offline
external usenet poster
 
Posts: 84
Default Export Chart as TIFF or JPG

Ed,

1) The code does not work. I am using Office 2007. I changed the code to
..png and the filtername to PNG. I get the same error.

2) I noticed you used ActiveChart. I am referencing excel charts that are
embedded in a worksheet. They are Chart sheets and I am not selecting the
chart.

I actually set a chart variable:

Set CurrentChart = Sheets("chart").ChartObjects(1).Chart

Any ideas why this isn't working for me?


Tony


"Ed Ferrero" wrote:
Hi Webtechie,

What version of Excel are you using?

TIF export was available in XL 2000, but not 2003 or 2007
It does work in 2003 if you have installed both 2000 and 2003. Note that you
need to run setup to install the required graphics filters, not all are
installed by default.

I would suggest you use PNG to use charts in Crystal Report. JPG is a lossy
format.

Also, you need to change the file extension in your code for myFileName as
well as the FilterName.

eg

ActiveChart.Export path & filename & ".PNG", FilterName:="PNG"

Ed Ferrero
www.edferrero.com