TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 270
- Office Version
- 365
- Platform
- Windows
Hello,
I have a list of urls in column K. I want to be able to download them as mhtml files.
Here's what I have (which creates a file on my hard drive but I can't open it, it just opens multiple tabs and I have to CTRL-ALT-DEL to kill the process):
Anyone managed to achieve something similar?
Many thanks!
I have a list of urls in column K. I want to be able to download them as mhtml files.
Here's what I have (which creates a file on my hard drive but I can't open it, it just opens multiple tabs and I have to CTRL-ALT-DEL to kill the process):
Code:
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 GetPageTitle()
Dim i As Long, url As String
For i = 2 To 2
DoEvents
url = Sheet1.Range("K" & i).Value
URLDownloadToFile 0, url, "D:\Zoo Escape\" & Sheet1.Range("j" & i).Value & ".mhtml", 0, 0
Next
End Sub
Anyone managed to achieve something similar?
Many thanks!