is there a way to save pictures in worksheet as graphic filse elsewhere?

506 views
Skip to first unread message

alfonso gonzales

unread,
Dec 3, 2005, 6:48:25 AM12/3/05
to
is there a way to save pictures in a worksheet as graphic filse elsewhere
using VBA?

I need to save pictures in workbooks as separate JPG or GIF files. So far
haven't found a method. Why doesn't the Shape object support saving as
graphic file?

Has anyone ever faced this problem and succeeded?

Alfonso Gonzales


Gary''s Student

unread,
Dec 3, 2005, 8:05:02 AM12/3/05
to
Just use the VBA equivalent of Insert > Object


Sub Macro2()

'
Range("D8").Select
ActiveSheet.OLEObjects.Add(Filename:= _
"C:\Documents and Settings\Owner\Desktop\New Folder\DSC_0086.JPG",
Link:= _
False, DisplayAsIcon:=False).Select
End Sub

--
Gary''s Student

alfonso gonzales

unread,
Dec 4, 2005, 2:15:54 PM12/4/05
to

Hello

Thank you for the code. Perhaps my language wasnt clear enough in specifying
the problem. The solution I need should do the opposite: save a picture FROM
a workbook to a image file.

Alfonso Gonzales

Vic Eldridge

unread,
Dec 4, 2005, 9:09:19 PM12/4/05
to
Hi Alfonso,

You could copy the picture then paste it onto a chart. Charts have an
Export method that can create a graphic file of what's displayed on the chart.


Regards,
Vic Eldridge

Ron de Bruin

unread,
Dec 5, 2005, 3:01:56 PM12/5/05
to
Hi alfonso

Save the file as a webpage and you will get a htm file and a folder with the pictures

--
Regards Ron de Bruin
http://www.rondebruin.nl


"alfonso gonzales" <alfonso....@wp.pl> wrote in message news:Ouoj09$9FHA...@TK2MSFTNGP11.phx.gbl...

Reply all
Reply to author
Forward
0 new messages