'This sample gets text on a Web page
Sub extract()
Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim text() As String
Dim webText As String
Dim size, i As Integer
'Get a handle to the workspace
Set app = GetObject("InfoConnect Workspace")
'Go to a Web page
ThisWebControl.Navigate1 "https://www.microfocus.com/documentation/reflection-desktop/17-0/vba-guide/AboutVBA.html"
'Wait until the document is ready
Do Until ThisWebControl.ReadyState = WebBrowserReadyState_Complete
app.Wait (1000)
Loop
'Get the text on the first paragraph
text = ThisWebControl.Document.extract("Visual Basic for Applications", "objects", False)
'Get the size of the array that is returned
size = UBound(text) - LBound(text) + 1
'If text is returned, print the text
If size = 0 Then
Debug.Print "Did not find text"
Else
For i = 0 To UBound(text)
Debug.Print text(i)
Next
End If
End Sub