#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default HTML Span

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default HTML Span

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").inne rHTML
to get the contents of the span element.

Andrew


On 6 Nov, 07:47, wrote:
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default HTML Span

Thank you for your response, that is exactly what I was looking for.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graph over a time span daisy Charts and Charting in Excel 1 April 14th 10 06:24 PM
Time Span calculations Jafferi[_2_] Excel Worksheet Functions 4 June 8th 09 05:43 AM
Sum within date span [email protected] Excel Programming 3 September 17th 06 01:14 PM
Sum with Date Span F. Lawrence Kulchar Excel Programming 1 September 17th 06 01:13 PM
Time Span mrbalaje Excel Discussion (Misc queries) 6 June 16th 05 11:34 PM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"