|
|
|
Here's a quick way to retrieve the textual (that is, without any HTML tag) contents of a WebBrowser control: |
Getting the HTML text is a tad less intuitive, though: |
The following procedure let's you save the contents of a WebBroser control to a file, as plain text or HTML text: |
Click here to copy the following block | Sub SaveWebBrowser(WB As WebBrowser, ByVal FileName As String, _ Optional SaveAsPlainText As Boolean) Dim Text As String, fnum As Integer
If SaveAsPlainText Then Text = BW.Document.Body.innerHTML Else Text = BW.Document.documentElement.OuterHTML End If
fnum = FreeFile Open FileName For Output As #fnum Print #fnum, Text; Close #fnum End Sub |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|