By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,274 Members | 1,993 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,274 IT Pros & Developers. It's quick & easy.

designating an open browser window to read data

P: n/a

I've used the following code to open a browser window and read the data
to a file. I know there is another way using a query, but that doesn't
work for this application.

What I'd like to be able to do is select a this open browser after
opening other explorer windows.

This would be similar to the command:

Workbooks("objects.xls").Activate

where I have a file named objects.xls open in excel

An alternative would be to select a browser window after I've opened it
manually.

Other ideas I can work with.

How can I read the caption from a browser after activating it?

Is there such a thing like currentwindow.caption?

Thanks for your help. Please do not email me as I never look at that
one.
_________________________________________________

Sub openbrowswer_save_to_list2()

Set objie = CreateObject("InternetExplorer.Application")
objie.Visible = True
objie.Navigate ("http://www.yahoo.com/")

Do While objie.Busy
Loop

Do While objie.Document.readyState <> "complete"
Loop

Set fs = CreateObject("Scripting.FileSystemObject")
Set stream = fs.CreateTextFile("list2.txt")
stream.Write objie.Document.body.innerhtml
stream.Close

End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Cor
Hi Visual.Basic.Application man,

Did you maybe post to the wrong newsgroup, this is VB.net languages?
Not VBA.

Cor

I've used the following code to open a browser window and read the data
to a file. I know there is another way using a query, but that doesn't
work for this application.

What I'd like to be able to do is select a this open browser after
opening other explorer windows.

This would be similar to the command:

Workbooks("objects.xls").Activate

where I have a file named objects.xls open in excel

An alternative would be to select a browser window after I've opened it
manually.

Other ideas I can work with.

How can I read the caption from a browser after activating it?

Is there such a thing like currentwindow.caption?

Thanks for your help. Please do not email me as I never look at that
one.
_________________________________________________

Sub openbrowswer_save_to_list2()

Set objie = CreateObject("InternetExplorer.Application")
objie.Visible = True
objie.Navigate ("http://www.yahoo.com/")

Do While objie.Busy
Loop

Do While objie.Document.readyState <> "complete"
Loop

Set fs = CreateObject("Scripting.FileSystemObject")
Set stream = fs.CreateTextFile("list2.txt")
stream.Write objie.Document.body.innerhtml
stream.Close

End Sub

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.