URL/HYPERLINK
This is how I modified what you gave me, it worked to download the image from
hyperlink in "D2" but none of the others. I am not sure why, I specified the
range thru D12. Any further clue. I am excited it did the one. THANKS!
Below is how modified the macro.
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("D2:D12").Hyperlinks(1).Address '<<< CHANGE
FName = FolderName & "\" & Mid(URL, InStrRev(URL, "/") + 1)
URLDownloadToFile 0&, URL, FName, 0&, 0&
--
sdatools
"samboy" wrote:
I have urls/hyperlinks in a column of my spreadsheet linking to my suppliers
image server? how do I retrieve the iamges and save the image in a file and
place the jpeg/gif name in an adjacent cell. there are approximatly 15000
url. Can it be automated.
--
sean
|