Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / GetText2 Method
The starting row position.
The starting column position.
The ending row position.
The ending column position.
Example
In This Topic
    GetText2 Method
    In This Topic
    Retrieves text from the specified screen region. Text from the "wrapped" region is returned.
    Syntax
    expression.GetText2( _
       ByVal startRow As Integer, _
       ByVal startColumn As Integer, _
       ByVal endRow As Integer, _
       ByVal endColumn As Integer _
    ) As String
    where expression is a variable that represents a Screen Object

    Parameters

    startRow
    The starting row position.
    startColumn
    The starting column position.
    endRow
    The ending row position.
    endColumn
    The ending column position.

    Return Value

    The requested string.
    Remarks
    If the row or column parameters are outside the range of valid values (1 to Rows) or (1 to Columns), an empty string is returned.

    For more about using the GetText2 method, see:

    Example
    This sample gets the text in display memory and displays it in the Immediate window. Before you run this sample, choose Immediate Window on the VBA editor View menu.
    Sub GetTextInDisplayMemory()
     
         Dim maxRow As Long, maxCol As Long, firstCol As Long
        
         maxRow = ThisScreen.DisplayRows
         maxCol = ThisScreen.DisplayColumns
         topRow = ThisScreen.DisplayMemoryTopRow
     
            
        Dim text As String
        
        'Get all the text on the screen from the top row to the last row and column
        text = ThisScreen.GetText2(topRow, 1, maxRow, maxCol)
             
        Debug.Print text
     
    End Sub
    See Also