Im trying to get a webpage on my Hard Drive. I have tried
VB Code:
sHtml = Inet1.OpenURL("file:///c:\My Files\Web.htm")
but it does not work!
sHTML ends up containing nothing
Printable View
Im trying to get a webpage on my Hard Drive. I have tried
VB Code:
sHtml = Inet1.OpenURL("file:///c:\My Files\Web.htm")
but it does not work!
sHTML ends up containing nothing
what happens if you remove the file:/// portion?
are you trying to view the source, or view the actual page?
if you're trying to get the source, why can't you just open the file for input?
I could open it for input but that would mean I would have to add more code. If possible I want to just use this (as it normally downloads from a webpage.). If I remove the file:/// it says Error: address malformed!
Doesn't using the inet control make your executable bigger anyway? For the sake of 3 lines of code ->
VB Code:
Open "X" For Input As #1 sHtml = Input(LOF(1), 1) Close #1
Perhaps try /'s instead of \'s in the address - if you still want to persist with the inet control :)
Well I will still like to see if i can use it. but if it does not work I will use the Open for input
I also have another reason for using it as it appears to add another return chacter to my lines compared to INET which means I would have to change some of my code to make it work
I have been told that it is not possible to open a local file with INET unless I'm using a Web server app.
Thanks