Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VBScript to pull html source code

I am running a script on a vendor's website and searching for missing images
(whereby the imagename is always a blank jpg named 'imageNA.jpg').

I have the logic to pull the actual site with variables handling the parts
of the URL - I am trying to grab the source code and logically step thru to
see which images are blank (this is for about 900,000 products).

Is there Excel vbscript to pull just the html source code out there?

thanks!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBScript to pull html source code

code previously posted by Jake Marx:

Sub Demo()
Dim ie As Object
Dim sWholeFile As String
Dim asLineByLine() As String
Dim lLine As Long


Set ie = CreateObject("InternetExplorer.Application")


ie.Navigate "http://www.longhead.com/"


Do While ie.Busy And Not ie.ReadyState = 4
DoEvents
Loop


sWholeFile = ie.Document.body.innerhtml
ie.Quit
Set ie = Nothing
asLineByLine = Split(sWholeFile, vbCrLf)


For lLine = LBound(asLineByLine) To UBound(asLineByLine)
Sheet1.Cells(lLine + 1, 1).Value = asLineByLine(lLine)
Next lLine
End Sub


--

Regards,

Tom Ogilvy





"Nixter" wrote in message
...
I am running a script on a vendor's website and searching for missing

images
(whereby the imagename is always a blank jpg named 'imageNA.jpg').

I have the logic to pull the actual site with variables handling the parts
of the URL - I am trying to grab the source code and logically step thru

to
see which images are blank (this is for about 900,000 products).

Is there Excel vbscript to pull just the html source code out there?

thanks!!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VBScript to pull html source code

Tom - THANK YOU!!



"Tom Ogilvy" wrote:

code previously posted by Jake Marx:

Sub Demo()
Dim ie As Object
Dim sWholeFile As String
Dim asLineByLine() As String
Dim lLine As Long


Set ie = CreateObject("InternetExplorer.Application")


ie.Navigate "http://www.longhead.com/"


Do While ie.Busy And Not ie.ReadyState = 4
DoEvents
Loop


sWholeFile = ie.Document.body.innerhtml
ie.Quit
Set ie = Nothing
asLineByLine = Split(sWholeFile, vbCrLf)


For lLine = LBound(asLineByLine) To UBound(asLineByLine)
Sheet1.Cells(lLine + 1, 1).Value = asLineByLine(lLine)
Next lLine
End Sub


--

Regards,

Tom Ogilvy





"Nixter" wrote in message
...
I am running a script on a vendor's website and searching for missing

images
(whereby the imagename is always a blank jpg named 'imageNA.jpg').

I have the logic to pull the actual site with variables handling the parts
of the URL - I am trying to grab the source code and logically step thru

to
see which images are blank (this is for about 900,000 products).

Is there Excel vbscript to pull just the html source code out there?

thanks!!




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
Can I import raw HTML source code into Excel? J Diorio Excel Programming 5 July 11th 08 06:37 AM
Macro to pull info from html page Mex Excel Discussion (Misc queries) 0 April 17th 07 09:52 PM
How to pull specific data from HTML? eboudrot Excel Programming 0 January 14th 04 10:49 PM
looking for html to pull series of urls Dick Excel Programming 1 December 7th 03 07:36 PM
Calling HTML Source code from within VBA for Excel Peter Dickson Excel Programming 0 July 9th 03 08:38 PM


All times are GMT +1. The time now is 02:06 PM.

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"