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: 64
Default Export from EXcel to jpg with 2007

Tom Ogilvy posted the following code some time back and it works wonderfully
in Excel 2003 but, of course, encounters problems in 2007. Can anyone give
suggestions for bringing it up to date for 2007?

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

Thanks for any help given,
--
Pops Jackson
 
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
Excel 2007 XML Export biz7 Excel Worksheet Functions 0 July 10th 09 02:38 AM
export of data from SAP to MS-Excel 2007 Darshan Excel Discussion (Misc queries) 2 January 22nd 09 02:53 PM
Export Library from WMP 11 to Excel 2007 Dennis Excel Discussion (Misc queries) 0 February 3rd 08 08:18 PM
export data from sap to excel 2007 jain_sanju Excel Discussion (Misc queries) 0 December 17th 07 05:38 AM
Export to Excel 2007 Amitabh Excel Programming 5 April 18th 07 03:57 PM


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