LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default How to automatically create a thumbnail of a published chart/image

Hi All,

Not sure whether this is the right forum for this question, but here
goes.

I have a spreadsheet with a series of statistics and graphs on it. I
have a button which links to a macro that automatically publishes these
graphs to a location on the network (see code below). My situation is
this. I need to be able to programmatically create a thumbnail of
these images for use in an HTML page which will be a link to the
full-sized image. If I just use html to re-size the image, the image
is ruined and blotchy, for lack of a better word.

Can anyone suggest a solution to my problem?

Any help would be hugely appreciated

Cheers

Rob

My current code is this:

strURL1 = "<Publish Location"
strURL2 = "<Graph Final Location"

Call pubIndividual("<graph name", "<graph alias")



Function pubIndividual
strFileNameFull = <DateStamped File Name & path

With ActiveWorkbook.PublishObjects(strChart)
.Filename = strURL1 & strFileNameFull & ".htm"
.Publish (False)
End With

CopyRenameBugFile
End Function


Sub CopyRenameBugFile()

Dim fs As Scripting.FileSystemObject
Dim f As Scripting.Folder
Dim f1 As Scripting.File

On Error GoTo CloseFilesAndRaise

Set fs = New Scripting.FileSystemObject
Set f = fs.GetFolder(strURL1 & strFileNameFull & "_files")

For Each f1 In f.Files
If UCase(Right(f1.Name, 3)) = "GIF" Then
'================================================= ========
'This is the original file that I want to resize
'================================================= ========
f1.Copy strURL2 & <Clean File Name & ".gif", True
'================================================= ========
Exit For
End If
Next

Set f = Nothing
Set fs = Nothing

Exit Sub

CloseFilesAndRaise:
Set f = Nothing
Set fs = Nothing
Err.Raise (Err)

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
Create a print macro that would automatically select print area? wastedwings Excel Worksheet Functions 7 August 22nd 05 10:36 PM
Why does Excel automatically create a temporary Word archive file. Perplexed Excel Discussion (Misc queries) 3 March 1st 05 06:26 PM
How do I create a formula in excel to automatically copy text fro. ijgolding Excel Discussion (Misc queries) 1 January 31st 05 12:37 PM
How do I create spreadsheet that automatically updates numbers/va. bunyip Excel Discussion (Misc queries) 2 December 8th 04 11:54 AM
How do I create a button or control that will automatically go to Roger Excel Worksheet Functions 1 October 29th 04 01:31 AM


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