Click to See Complete Forum and Search --> : Grabbing Text....
Static
Nov 6th, 2000, 01:14 PM
How do you grab the text off a web page then save it as a text file....!
I know:
Webbrowser1.Document.documentElement.innerHTML
gets the HTML....
I want just the text on the screen.
also..how do I trigger the Save command in a webbrowser?
THANKS!
joey o.
Nov 6th, 2000, 01:52 PM
I didn't have time to test but this should work:
First Page:
<html>
<Head></Head>
<Body>
<form Action="myStuff.asp" method="POST">
Blurbs:
<input type="text" name="Blurbs"><br>
<input type="submit" name="Submit" value="Submit!">
</form>
</Body>
</html>
Second Page: Name it "mystuff.asp"
<%Response.Buffer=true%>
<html>
<Head></Head>
<Body
<%Dim filesys, Mystuff
Set filesys = CreateObject("Scripting,FileSystemObject")
Set Mystuff = filesys.OpenTextFile("c:\inetpub\wwwroot\HereItIs.txt",8,true)
Mystuff.WriteLine Request.Form("Blurbs")
Mystuff.Close%>
<H2>Go to "c:\inetpub\wwwroot\HereItIs.txt" and see Mystuff!</H2>
</Body>
</html>
Static
Nov 6th, 2000, 01:55 PM
I have my own webbrowser...I need the program to do it....No ASP.
To save the source:
Private Sub Command1_Click()
Dim strHTML As String
strHTML = Webbrowser1.Document.documentElement.innerHTML
Open "C:\Source.txt" For Output As #1
Print #1, strHTML
Close #1
End Sub
And to trigger the Save dialog box:
WebBrowser1.ExecWB OLECMDID_SAVEAS,OLECMDEXECOPT_PROMPTUSER
Static
Nov 6th, 2000, 02:33 PM
I know how to do that one...I dont need the source.
I need the actual text on the page. (I dont want to have to pull it out of the source)
Is there a way to save the page displayed as a text file (not the html)???
Thanks
Static
Nov 6th, 2000, 02:58 PM
Thanks Matthew Gates...
To trigger the save as Dialog is good enough....
(It would be great if I could tell it to save it as a certain name and file type)
I'll have to settle for Almost full automation....
So close.....
Thanks
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.