LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Graphs to eps image

Hi

I'm trying to find a quick way of getting a graph into an image. Probably
part of the problem is my ignorance of different image formats. Anyway, for
a latex project apparently .eps is the way to go. However, it's a bit of a
pain printing it to a file, and also formating etc is sometimes changed.

I found a very easy way to get an active chart to become a .gif file (code
below. Sheet1!B3 contains a subdirectory for the file to go into). This
works very well, but I'd have to change it to a .eps. Is there some way to
do this in one step without going through the print to file rigmarole.

The issue is that there's loads of graphs in loads of files in loads of
directories that all need to be converted into .eps in a single directory.
Having the file with the below code in does everything except it converts
into .gif.

Thanks

Glenton


Sub GraphToImage()

Set CurrentChart = ActiveChart

MyPath = ThisWorkbook.Sheets("Sheet1").Range("b3")
MyFile = InputBox("File name")

If Right(MyFile, 3) = "gif" Then
Fname = ThisWorkbook.Path & MyPath & MyFile
Else
Fname = ThisWorkbook.Path & MyPath & MyFile & ".gif"
End If

CurrentChart.Export Filename:=Fname, FilterName:="GIF"

End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to search image of my local drive with Image name or Image Title, Description [email protected] Excel Programming 3 August 3rd 07 01:44 PM
VBA to display image on a form - image is defined in Range Name Tan Excel Programming 4 May 17th 06 03:37 PM
Hyperlink to an image in other worksheet, displaying entire image. twilliams Excel Worksheet Functions 0 February 7th 06 10:02 PM
Exporting EXCEL Graphs as .gif (image file) using VBA or VB haresh7263 Excel Programming 1 July 11th 05 02:39 AM
Export the worksheet background image as an image file - possible? DataFreakFromUtah Excel Programming 2 April 10th 04 04:49 PM


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"