Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Save image name to spreadsheet

The macro works perfect to retrieve 1000's of supplier images. Is there
anyway to place the saved name from the image folder back to the appropriate
cell in the spreadsheet?

Private Declare Function URLDownloadToFile _
Lib "urlmon" Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long

Sub AAA()
Dim FolderName As String
Dim URL As String
Dim FName As String


FolderName = "C:\Test" '<<< CHANGE
For i = 1 To Range("D2:D16500").Hyperlinks.Count
URL = Range("D2:D16500").Hyperlinks(i).Address '<<< CHANGE
FName = FolderName & "\" & Mid(URL, InStrRev(URL, "/") + 1)
URLDownloadToFile 0&, URL, FName, 0&, 0&
Next i
End Sub
--
sdatools
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
How can I save an image I edited in Excel? KyleJA Excel Discussion (Misc queries) 1 September 20th 08 11:41 PM
when I add an image to a spreadsheet it becomes invisible unless . david641 Excel Discussion (Misc queries) 0 October 16th 07 02:08 PM
how do i save an excel graph as an image file for use on the inter jimwarlick Charts and Charting in Excel 3 July 9th 07 06:05 PM
BEFORE SAVE IMAGE help me out Excel Worksheet Functions 1 December 1st 05 04:26 PM
image as a spreadsheet background melon Excel Discussion (Misc queries) 4 January 10th 05 05:48 PM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"