指定のURLから生成されるHTMLをファイル化して、ローカルに保存する。
Private Declare Function DeleteUrlCacheEntry Lib "wininet" Alias "DeleteUrlCacheEntryW" ( _ ByVal lpszUrlName As Long) As Long Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileW" ( _ ByVal pCaller As Long, _ ByVal szURL As Long, _ ByVal szFileName As Long, _ ByVal dwReserved As Long, _ ByVal lpfnCB As Long) As Long Public Sub test_download() If HTML_Download("http://xxxx", "C:\temp\test.html") <> 0 Then MsgBox "Fail!" Else MsgBox "Done!" End If End Sub Function HTML_Download(ByVal HTML_URL As String, ByVal SavePath As String) As Long DeleteUrlCacheEntry StrPtr(HTML_URL) HTML_Download = URLDownloadToFile(0, StrPtr(HTML_URL), StrPtr(SavePath), 0, 0) End Function