Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with a simple problem

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
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 =---
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with a simple problem

Thanks Nigel, that gets me part of the way there.

Any idea how to do a <File<Save As in IE?

"Nigel" wrote in
:

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 =---


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
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Simple problem I'm sure John New Users to Excel 1 February 15th 06 01:37 AM
Simple problem? Foobi Excel Worksheet Functions 3 February 10th 06 10:24 PM
A simple problem... Chris Gorham[_3_] Excel Programming 2 December 24th 03 02:47 PM
Another simple little problem Jerry[_14_] Excel Programming 1 November 3rd 03 03:00 AM


All times are GMT +1. The time now is 03:51 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"