CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Selecting all text from webbrowser control?

    I am trying to make an internet browser that integrates the microsoft agent control. I want the character to read any text on the web page I load. Right now the user has to hit control A, then control C, then hit a Read Page button.
    I copy the text from the clipboard into an invisible text box he reads from.

    My question is, is there anyway to select all text from a webbrowser object? If I can figure this out, I can automate the rest myself.

    I hope you can help,

    Thanks,

    Tony



  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Selecting all text from webbrowser control?

    You can use the Document.Body Object to Extract all the Text on the Webpage, (as it reads, non-HTML Tags), ie.

    private Sub Command1_Click()
    WebBrowser1.Navigate "www.redwingsoftware.com"
    End Sub

    private Sub WebBrowser1_DocumentComplete(byval pDisp as Object, URL as Variant)
    Text1 = WebBrowser1.Document.Body.innerText
    End Sub




    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Guest

    Re: Selecting all text from webbrowser control?

    Thanks a million, works perfect.


    Tony



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured