Retrieves text from the specified screen region. Text from the "wrapped" region is returned.
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