Access/VBA Library

scrapeElements Method

Returns the content of all elements on the current webpage matching the given CSS-selector.

See also:


clsIE.scrapeElements( cssSelector )
Name Type Description
clsIE   The name of an object of type clsIE
cssSelector String Required. Pattern to select the elements on the current webpage.
Return value

Collection : Each entry contains the content of a selected element.

Dim IE As New clsIE
Dim content As Collection
Dim index As Long

IE.location = ""
Set content = IE.scrapeElements("p.w3-xlarge")
For index = 1 To content.count
    Debug.Print content(index)
Next index
' Immediate results:
'The language for building web pages
'The language for styling web pages
'The language for styling web pages
'The language for programming web pages