Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Search OuterText or OuterHTML

Posted on 2006-04-26
3
Medium Priority
?
397 Views
Last Modified: 2008-02-26
I want to search the OuterText or OuterHTML of a browser control for a certain word. Please advise.
0
Comment
Question by:John Account
3 Comments
 
LVL 12

Expert Comment

by:Bob Lamberson
ID: 16549272
JohnLucio,
what is OuterText or OuterHTML?

Bob
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 2000 total points
ID: 16549339
Something like this?

Private Sub Command1_Click()
WebBrowser1.Navigate2 "http://www.experts-exchange.com"
End Sub

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim pos1 As String, pos2 As String
Dim strData As String, SearchWord As String
strData = WebBrowser1.Document.Body.OuterText

SearchWord = "Puzzles"

pos1 = InStr(strData, SearchWord)
If pos1 > 0 Then
    MsgBox "String was found at position " & pos1
Else
    MsgBox "String was not found"
End If
End Sub
0
 

Author Comment

by:John Account
ID: 16554550
Thanks, vinnyd79.

That was an example of what OuterText is, BobLamberson. As far as I know, OuterHTML is basically the same thing--it's not the html. It's the text that is rendered by the html.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

564 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