[AccessD] IE search for table

jwcolby jwcolby at colbyconsulting.com
Wed Apr 6 14:45:22 CDT 2011


Function mSearchTable()
Dim varTables As Variant
Dim varTable As Variant

Dim strOffenderInfo As String
Dim strMostRecent As String


Set varTables = wbbWebsite.Document.All().tags("table")
   Set varTables = wbbWebsite.Document.All.tags("TABLE")
   For Each varTable In varTables

     Dim strInnerText As String
     strInnerText = varTable.innerText
     'Use the innerText to see if this is the table we want.
     'Debug.Print varTable.innerText

     If (InStr(strInnerText, "Offender Information")) And Len(strOffenderInfo) = 0 Then
         strOffenderInfo = strInnerText
     Else
     If (InStr(strInnerText, "Most Recent Incarceration Summary ")) And Len(strMostRecent) = 0 Then
         strMostRecent = strInnerText
     End If

     End If
   Next varTable
   Debug.Print strOffenderInfo
   Debug.Print strMostRecent
Cleanup:

   Set varTable = Nothing: Set varTables = Nothing
   'objIE.Quit
   'Set objIE = Nothing
End Function

-- 
John W. Colby
www.ColbyConsulting.com



More information about the AccessD mailing list