Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default export in graphic format - experts, can vba do it?

Hi,
How exports by programming the shape (in sheet) or entire
userform in a graphic format e.g. jpg, gif?
I would be very happy if anyone could help me in this.

I've excel 2k
Best regards
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default export in graphic format - experts, can vba do it?

Mark,
1 way, Save As Web page and all graphics are generated in a separate folder.
Does work with userforms though.

NickHK

"Mark" wrote in message
...
Hi,
How exports by programming the shape (in sheet) or entire
userform in a graphic format e.g. jpg, gif?
I would be very happy if anyone could help me in this.

I've excel 2k
Best regards
Mark



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default export in graphic format - experts, can vba do it?

Hi,
I saved (shape) as Web paged but its create folder and
other files.
I wonder, if is any way (maybe api) to export to only one
files with grapic format jpg or gif.
Or can I create for that purpose any class object (shape)
with metod export to file jpg?

Regards
Mark

-----Original Message-----
Mark,
1 way, Save As Web page and all graphics are generated in

a separate folder.
Does work with userforms though.

NickHK

"Mark" wrote in message
...
Hi,
How exports by programming the shape (in sheet) or

entire
userform in a graphic format e.g. jpg, gif?
I would be very happy if anyone could help me in this.

I've excel 2k
Best regards
Mark



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default export in graphic format - experts, can vba do it?

You might be interested in Andy Pope's Graphics Exporter:
http://www.andypope.info/vba/gex.htm

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Mark" wrote in message
...
Hi,
How exports by programming the shape (in sheet) or entire
userform in a graphic format e.g. jpg, gif?
I would be very happy if anyone could help me in this.

I've excel 2k
Best regards
Mark



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default export in graphic format - experts, can vba do it?

Mark,

Here's a start at another technique. I think if you search you'll find that
others have perfected this. Pubs open and have to go.

The immediate limitation is that the picture has to fit on the screen as far
as I can see, but give it a whirl and see if it works for you.

Sub ExportPicAsJpg()
Dim chTemp As Chart
Dim picCopy As Picture
Dim dWidth As Double
Dim dHeight As Double
Dim shNew As Worksheet

Set picCopy = Selection
Set chTemp = Charts.Add
Set shNew = Sheets.Add

dWidth = picCopy.Width
dHeight = picCopy.Height

Application.ScreenUpdating = False
With chTemp

.SetSourceData Source:=Sheets("Sheet1").Range("FA16383")
.Location Whe=xlLocationAsObject, Name:=shNew.Name

With shNew.ChartObjects(1)

.Width = dWidth + 2
.Height = dHeight + 2
.Top = 0
.Left = 0
Range("A1").Select
picCopy.Copy
.Activate
ActiveChart.Paste
.Interior.ColorIndex = 1
ActiveChart.Export "c:\TempPic.JPG", "jpg"

End With

End With

Application.DisplayAlerts = False
shNew.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Robin Hammond
www.enhanceddatasystems.com

"Rob van Gelder" wrote in message
...
You might be interested in Andy Pope's Graphics Exporter:
http://www.andypope.info/vba/gex.htm

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Mark" wrote in message
...
Hi,
How exports by programming the shape (in sheet) or entire
userform in a graphic format e.g. jpg, gif?
I would be very happy if anyone could help me in this.

I've excel 2k
Best regards
Mark







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default export in graphic format - experts, can vba do it?

Won't work with forms etc.

"Robin Hammond" wrote:

Mark,

Here's a start at another technique. I think if you search you'll find that
others have perfected this. Pubs open and have to go.

The immediate limitation is that the picture has to fit on the screen as far
as I can see, but give it a whirl and see if it works for you.

Sub ExportPicAsJpg()
Dim chTemp As Chart
Dim picCopy As Picture
Dim dWidth As Double
Dim dHeight As Double
Dim shNew As Worksheet

Set picCopy = Selection
Set chTemp = Charts.Add
Set shNew = Sheets.Add

dWidth = picCopy.Width
dHeight = picCopy.Height

Application.ScreenUpdating = False
With chTemp

.SetSourceData Source:=Sheets("Sheet1").Range("FA16383")
.Location Whe=xlLocationAsObject, Name:=shNew.Name

With shNew.ChartObjects(1)

.Width = dWidth + 2
.Height = dHeight + 2
.Top = 0
.Left = 0
Range("A1").Select
picCopy.Copy
.Activate
ActiveChart.Paste
.Interior.ColorIndex = 1
ActiveChart.Export "c:\TempPic.JPG", "jpg"

End With

End With

Application.DisplayAlerts = False
shNew.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Robin Hammond
www.enhanceddatasystems.com

"Rob van Gelder" wrote in message
...
You might be interested in Andy Pope's Graphics Exporter:
http://www.andypope.info/vba/gex.htm

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Mark" wrote in message
...
Hi,
How exports by programming the shape (in sheet) or entire
userform in a graphic format e.g. jpg, gif?
I would be very happy if anyone could help me in this.

I've excel 2k
Best regards
Mark






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
Is it possible to export an Excel 2007 chart as a vector graphic? ebfish Excel Discussion (Misc queries) 0 September 10th 08 07:44 PM
Export Format basic Excel Discussion (Misc queries) 19 August 11th 08 09:44 PM
Format data table in a graphic Mb8a Excel Discussion (Misc queries) 0 October 26th 06 12:24 AM
What graphic file format prints best out of Excel? MCmomma Excel Discussion (Misc queries) 1 December 13th 05 05:35 PM
What graphic format? Siberian Excel Discussion (Misc queries) 0 July 21st 05 03:11 PM


All times are GMT +1. The time now is 04:53 PM.

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"