Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default save picture in a worksheet programmatically

Hi,
i searched queries up to now and could not find anything about saving a
picture in a normal worksheet(not a chart) to a local directory as a gif/jpg
file programmatically.
please, can anybody help me?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default save picture in a worksheet programmatically

why is it easy to insert a picture into worksheet but no way to save the same
picture
in a file directory?
i am sure there are people facing the same problem as i do. is there any way
to save the picture programmatically?
can anybody please help me?

thanks,

"ermeko" wrote:

Hi,
i searched queries up to now and could not find anything about saving a
picture in a normal worksheet(not a chart) to a local directory as a gif/jpg
file programmatically.
please, can anybody help me?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default save picture in a worksheet programmatically

Hi,

The trick is to use the object that does support exporting, which is a
chart. Place your image within a chart object and then export.

Have a look at the code I use in my addin.
http://www.andypope.info/vba/gex.htm

Cheers
Andy

ermeko wrote:
why is it easy to insert a picture into worksheet but no way to save the same
picture
in a file directory?
i am sure there are people facing the same problem as i do. is there any way
to save the picture programmatically?
can anybody please help me?

thanks,

"ermeko" wrote:


Hi,
i searched queries up to now and could not find anything about saving a
picture in a normal worksheet(not a chart) to a local directory as a gif/jpg
file programmatically.
please, can anybody help me?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default save picture in a worksheet programmatically

ANDY THANKS,
how do i create chart programmatically?
how do i put a picture into that chart programmatically?
how do i then save it?
i visited the link and downloaded the code but could not understand anything
from that code. can you please explain it in a more simple code please?

thanks again,
"Andy Pope" wrote:

Hi,

The trick is to use the object that does support exporting, which is a
chart. Place your image within a chart object and then export.

Have a look at the code I use in my addin.
http://www.andypope.info/vba/gex.htm

Cheers
Andy

ermeko wrote:
why is it easy to insert a picture into worksheet but no way to save the same
picture
in a file directory?
i am sure there are people facing the same problem as i do. is there any way
to save the picture programmatically?
can anybody please help me?

thanks,

"ermeko" wrote:


Hi,
i searched queries up to now and could not find anything about saving a
picture in a normal worksheet(not a chart) to a local directory as a gif/jpg
file programmatically.
please, can anybody help me?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default save picture in a worksheet programmatically

Try this, although you will still need to specify which shape and output
filename.

Sub ShapeExport()

Dim objCht As ChartObject
Dim shpTemp As Shape

' reference the thing you want to export
Set shpTemp = ActiveSheet.Shapes(1)

With ActiveSheet.ChartObjects.Add(1, 1, 10, 10)
.Width = shpTemp.Width + 2
.Height = shpTemp.Height + 2
shpTemp.Copy
With .Chart
.Paste
With .ChartArea
With .Border
.Weight = 2
.LineStyle = 0
End With
.Interior.ColorIndex = xlNone
End With
' filename and folder
.Export "C:\MyImage.gif"
End With
.Delete
End With
End Sub

Cheers
Andy

ermeko wrote:
ANDY THANKS,
how do i create chart programmatically?
how do i put a picture into that chart programmatically?
how do i then save it?
i visited the link and downloaded the code but could not understand anything
from that code. can you please explain it in a more simple code please?

thanks again,
"Andy Pope" wrote:


Hi,

The trick is to use the object that does support exporting, which is a
chart. Place your image within a chart object and then export.

Have a look at the code I use in my addin.
http://www.andypope.info/vba/gex.htm

Cheers
Andy

ermeko wrote:

why is it easy to insert a picture into worksheet but no way to save the same
picture
in a file directory?
i am sure there are people facing the same problem as i do. is there any way
to save the picture programmatically?
can anybody please help me?

thanks,

"ermeko" wrote:



Hi,
i searched queries up to now and could not find anything about saving a
picture in a normal worksheet(not a chart) to a local directory as a gif/jpg
file programmatically.
please, can anybody help me?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply
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
Can I save a worksheet as a picture? Renny Bosch Excel Discussion (Misc queries) 3 March 30th 09 10:36 PM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
How do I programmatically get access to a picture or graphic? Stumpiana Excel Programming 2 November 18th 05 05:18 AM
how can i exports or save picture out of excel worksheet dk_arya Excel Programming 1 November 16th 04 12:49 PM
save picture in worksheet into certain folder wiwi[_2_] Excel Programming 0 December 29th 03 02:39 PM


All times are GMT +1. The time now is 04:52 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"