View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_8_] Nigel[_8_] is offline
external usenet poster
 
Posts: 172
Default Need help with a simple problem

Gary,
Here is one example which you can modify to suit........
set up the navigate text string which could be cell contents or any other
text
use the IE DOM to select the parts of the pages you require, here I use the
body.innertext.

Cheers
N


Sub GetUrl()
Dim ie As Object
Dim s As String

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Navigate "http://www.etc.etc"
Do Until Not .Busy And .ReadyState = 4
DoEvents
Loop

s = ie.Document.body.innertext 's now contains content of
webpage
.Quit
End With
Set ie = Nothing


"Gary" wrote in message
6...
I need some help controlling IE(6) from Excel(2003).

All I want to do(via Excel VB) is:

1. Open a URL with IE. (Via URL or hyperlink in a cell, sheet has both)

2. Save as a .MHT or .TXT file for further processing.

3. Close IE.

Can some kind soul out there throw me a code snippet or two?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---