HTML Span

K

k3holdings

Hey,

I am trying to search the source code of a web page for a specific
span. I can use

objIE = CreateObject("InternetExplorer.Application")

objIE.document.Links.href

to find a link but I'm wondering if there is a way to do something
like

objIE.document.span("lblOwnersVal").Name

This is what the span looks like in the source code. I want to search
by the span ID and
return the name DOE, JOHN

<span id="lblOwnersVal" tabindex="-1" class="parceldetail"
style="height:10px;width:280px;Z-INDEX: 101; LEFT: 184px; POSITION:
absolute; TOP: 352px">DOE, JOHN </span>

Any help would be appreciated.

Thanks,
Kyle
 
A

Andrew Taylor

I presume the line
objIE = CreateObject("InternetExplorer.Application")
should be
Set objIE = CreateObject("InternetExplorer.Application")

If I understand you correctly, you should be able to use
objIE.document.getElementById("lblOwnersVal").innerHTML
to get the contents of the span element.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top