Search Text
HI!!:
Is there a function to find a text in a WebBrowser Object?
I need to find a text and put just the next word into a text file. I have the next text in the WebBrowser:
PresetPos.Pos1="Home1"
PresetPos.Pos1="Home2"
I just want to put into the text file the words "Home1" and "Home2".
Thanks for your time!!!
[359 byte] By [
mechis] at [2007-11-11 7:05:27]

# 2 Re: Search Text
Thanks a lot, Phil Weber, and sorry if I make ypu go crazy the last time, I'm just learning VB.
I have some questions with the code, I copied the code you sent me, then I wrote in my project:
SaveWebBrowser(Web, App.Path & "\Param1.txt", True)
but when I pressed F5 an error appeared. Then I wrote:
Dim save
save = SaveWebBrowser(Web, App.Path & "\Param1.txt", True)
but another error appeared when I preesed F5: "A function or variable was expected".
Can you tell me what's my mistake, please?
An thank you very much!!!
mechis at 2007-11-11 17:28:28 >

# 3 Re: Search Text
SaveWebBrowser is a method (sub) that does not return any values. The correct syntax to call it is:
SaveWebBrowser Web, App.Path & "\Param1.txt", True
or
Call SaveWebBrowser(Web, App.Path & "\Param1.txt", True)
Marco
mstraf at 2007-11-11 17:29:34 >

# 4 Re: Search Text
This should work (assuming that "Web" is the name of your WebBrowser control):
SaveWebBrowser Web, App.Path & "\Param1.txt", True
What error do you get with that code?
# 5 Re: Search Text
Thank a lot!!
I corrected my mistake, but now when I press F5 appears "Error '91'" and this part of the code appears colored in yellow
Text = WB.Document.body.innerHTML
mechis at 2007-11-11 17:31:39 >
