Okay, making some head way, I can down load the file from the website in this sample know. Next problem that I have is that the actual file that I need to get to is behind a password protected screen.
Once I ask the user for the password, I need to populate the text field on IE with the password. How do I populate the text field and hit enter on the screen automatically?
I think I some how need to reference the information in this line of code but not sure how?
HTML Code:PHP 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
Private Const ERROR_SUCCESS As Long = 0
Private Const BINDF_GETNEWESTVERSION As Long = &H10
Private Const INTERNET_FLAG_RELOAD As Long = &H80000000
Private Sub FileDownLoad()
Dim test As Boolean
Dim sSourceUrl As String
Dim sLocalFile As String
sSourceUrl = "http://www.solarfective.com/pdf/quoteform.pdf"
sLocalFile = "D:\Documents and Settings\414004425\Desktop\Sample.pdf"
test = URLDownloadToFile(0&, sSourceUrl, sLocalFile, BINDF_GETNEWESTVERSION, 0&) = ERROR_SUCCESS
End Sub
Bookmarks