hi everyone , i have been looking for this code for some time ago and i can not get the correct code for it .
i have looked in forum for this code and all i can find is to save the html , or search the image links in html .
what i need is to open a direct image with webbrowser1 and save it to a specific location .
I was looking at this code and it works great if it is html :
Private Sub command1_Click()
Dim path As String
Dim HTMLcode As String
path = app.path + "\html\test.html"
WebBrowser1.Navigate "http://somesite.com/lala.html"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE ' wait for load completely
DoEvents
Loop
HTMLcode = WebBrowser1.Document.documentElement.innerHTML
Open path For Output As #1
Print #1, HTMLcode
Close #1
this code works perfect , but what i need is for a gif or a jpg or any other type of image .
something like this :
Private Sub command1_Click()
Dim path As String
Dim HTMLcode As String
path = app.path + "\html\image.gif"
WebBrowser1.Navigate "http://somesite.com/image.gif"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE ' wait for load completely
DoEvents
Loop
HTMLcode = WebBrowser1.Document.documentElement.innerHTML
Open path For Output As #1
Print #1, HTMLcode
Close #1
Now , what do i need to change in last code to work with images ?
inet is out of question because some sites don`t allow it to pick the images directly .
Thanks a lot for all the help .
i have looked in forum for this code and all i can find is to save the html , or search the image links in html .
what i need is to open a direct image with webbrowser1 and save it to a specific location .
I was looking at this code and it works great if it is html :
Private Sub command1_Click()
Dim path As String
Dim HTMLcode As String
path = app.path + "\html\test.html"
WebBrowser1.Navigate "http://somesite.com/lala.html"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE ' wait for load completely
DoEvents
Loop
HTMLcode = WebBrowser1.Document.documentElement.innerHTML
Open path For Output As #1
Print #1, HTMLcode
Close #1
this code works perfect , but what i need is for a gif or a jpg or any other type of image .
something like this :
Private Sub command1_Click()
Dim path As String
Dim HTMLcode As String
path = app.path + "\html\image.gif"
WebBrowser1.Navigate "http://somesite.com/image.gif"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE ' wait for load completely
DoEvents
Loop
HTMLcode = WebBrowser1.Document.documentElement.innerHTML
Open path For Output As #1
Print #1, HTMLcode
Close #1
Now , what do i need to change in last code to work with images ?
inet is out of question because some sites don`t allow it to pick the images directly .
Thanks a lot for all the help .