?
Solved

How can I "select all" text on an HTML page and copy it to a text file?

Posted on 2006-04-07
5
Medium Priority
?
159 Views
Last Modified: 2010-05-01
I have an app that uses the Microsoft Internet Control to display a web page.
How do I programatically select all the text on the web page and copy it to a text file?
0
Comment
Question by:yyuubum2
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 200 total points
ID: 16403666
Something like...

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    Open "c:\someFile.txt" For Output As #1
    Print #1, WebBrowser1.Document.documentelement.innertext
    Close #1
End Sub

0
 

Author Comment

by:yyuubum2
ID: 16404401
exactly..thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question