S
samboy
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("D216500").Hyperlinks.Count
URL = Range("D216500").Hyperlinks(i).Address '<<< CHANGE
FName = FolderName & "\" & Mid(URL, InStrRev(URL, "/") + 1)
URLDownloadToFile 0&, URL, FName, 0&, 0&
Next i
End Sub
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("D216500").Hyperlinks.Count
URL = Range("D216500").Hyperlinks(i).Address '<<< CHANGE
FName = FolderName & "\" & Mid(URL, InStrRev(URL, "/") + 1)
URLDownloadToFile 0&, URL, FName, 0&, 0&
Next i
End Sub