Powerpoint 2010 - vba - webbrowser object - Scroll control

Answered Powerpoint 2010 - vba - webbrowser object - Scroll control

  • Tuesday, May 01, 2012 1:42 PM
     
     

    Hi

    Does anyone have any tips on how to scroll the webbrowser object in powerpoint 2010 ?

    I have the window displaying fine, however i would like to automatically scroll the window down every 10s when the window is too long for the window (and is showing the scroll bar to the right)

    Thanks

All Replies

  • Wednesday, May 02, 2012 4:19 AM
     
     Answered

    Hi Greg,

    As far as I known that WebBrowser control doesn't have such function.

    Best Regards,

    T.X.

  • Thursday, May 03, 2012 12:34 AM
     
     Answered

    This seems to be the case, HOWEVER if you can click on the right hand side scroll bar, then a page down (via the vba sendkeys) will work.

    Without the scroll bar being clicked / selected, a page down moves to the next page.

    So a solution of sorts may be possible if i can select the scroll bar in VBA..

    I will post the result if i find it.

    On the VBA side there is
    WebBrowser1.Document.Body.ScrollTop which should be able to do this, however either it does not allow itself to be set, or if it does, it does not change, e.g.

    WebBrowser1.Document.Body.ScrollTop = 1000
    WebBrowser1.Refresh

    Only refreshes the page.

  • Thursday, May 03, 2012 7:25 AM
    Moderator
     
     

    Hi Greg,

    Thanks for posting in the MSDN Forum.

    What you shown seems only way for your issue.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us