How do you get the Web Browser Control to scroll to the end of a page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adam Kantor

    How do you get the Web Browser Control to scroll to the end of a page?

    How do you get the Web Browser Control to automatically scroll to the end of a web page?
  • Adam Kantor

    #2
    Figured it out.

    Code:
    'loop until the page is fully loaded
    Do While Me.wbbWebsite.readyState <> 4 Or Me.wbbWebsite.Busy
        DoEvents
    Loop
    
    'scroll to the bottom of the page
    Me.wbbWebsite.Document.parentWindow.Scroll 0, 2000

    Comment

    • Suma123
      New Member
      • May 2012
      • 1

      #3
      int height=WebBrows er1.Document.Bo dy.ScrollRectan gle.Height; WebBrowser1.Doc ument.Window.Pa rent.ScrollTo(0 ,height);

      Comment

      Working...