S
samboy
I am still trying to capture the jpegs on the image server from my supplier.
The macro you gave me works to download only the first url in my coumn. It
save one jpeg to the test file but doesn't insert the name of the new jpeg in
the next cell in the spreadsheet. IT does retreive one image,it will save
another image if icahng the value in () at the hyperlink equation and only if
its in the range. Any further help you can give me would be great.
Here is the macro I am using.
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
URL = Range("D290").Hyperlinks(8).Address '<<< CHANGE
FName = FolderName & "\" & Mid(URL, InStrRev(URL, "/") + 1)
URLDownloadToFile 0&, URL, FName, 0&, 0&
End Sub
The macro you gave me works to download only the first url in my coumn. It
save one jpeg to the test file but doesn't insert the name of the new jpeg in
the next cell in the spreadsheet. IT does retreive one image,it will save
another image if icahng the value in () at the hyperlink equation and only if
its in the range. Any further help you can give me would be great.
Here is the macro I am using.
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
URL = Range("D290").Hyperlinks(8).Address '<<< CHANGE
FName = FolderName & "\" & Mid(URL, InStrRev(URL, "/") + 1)
URLDownloadToFile 0&, URL, FName, 0&, 0&
End Sub