Reflection Desktop VBA Guide
Attachmate.Reflection.Objects Library / Attachmate.Reflection.Objects.Web.Msie Library / WebElement Object / ScrollIntoView Method
Example
In This Topic
    ScrollIntoView Method
    In This Topic
    Scrolls through the document that contains this element until the top or bottom edge of this element aligns with the top of the document's window.
    Syntax
    expression.ScrollIntoView( _
       ByVal alignWithTop As Boolean _
    ) 
    where expression is a variable that represents a WebElement Object

    Parameters

    alignWithTop
    Example
    This example opens a Web page and scrolls to a table on the page.
    Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
        Dim wElement As WebElement
        
        'Get a handle to the workspace
        Set app = GetObject("Reflection Workspace")
        
        ThisWebControl.Navigate1 "https://www.microfocus.com/documentation/reflection-desktop/17-0/"
     
        Do Until ThisWebControl.ReadyState = WebBrowserReadyState_Complete
          app.Wait (1000)
        Loop
        
        'Get the Web element for the Programming Resources table
        Set wElement = ThisWebControl.Document.GetElementById("programming_resources")
        
        'Scroll to the Programming Resources table
        wElement.ScrollIntoView (True)
        
        
    End Sub
    See Also