|
-
May 25th, 2004, 08:15 PM
#1
Thread Starter
Fanatic Member
searching web pages in vb
hello,
I have a phrase in Text1 and an url in Text2.
my question is, how do I search for a phrase in a web page to
see if it's in it or not using vb?
thanks
-
May 25th, 2004, 10:30 PM
#2
im assuming you are using the webbrowser control...
VB Code:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is WebBrowser1.Application) Then
Doc = WebBrowser1.Document.documentelement.innertext
If InStr(Doc, Text2.Text) Then
MsgBox "its there!"
End If
End If
End Sub
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
May 26th, 2004, 11:12 AM
#3
Thread Starter
Fanatic Member
what type of variable is Doc?
-
May 26th, 2004, 11:18 AM
#4
sorry..
Dim Doc as String
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
May 26th, 2004, 11:41 AM
#5
Thread Starter
Fanatic Member
I have a list of pages to search. if i open each one and search
in them for a phrace it will take me a long time until I'm done...
is there a fatest way to do that?
-
May 26th, 2004, 02:25 PM
#6
not really...
you need to either download them...or "browse" to each one...
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Sep 7th, 2004, 06:48 AM
#7
Thread Starter
Fanatic Member
ok, thanks [LGS]Static.
but there is a problem with the above code...
if I enter the phrase "<html>" it will also find it...
what I want to search is the web page...
any other suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|