X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Internet Explorer Object, Navigation, Hiding    
post Mar 1 2010, 04:35 PM

Posts: 1,177
Joined: 11-August 03
From: Denver - CO

I use the IE object to navigate to a website and pull some information. I've run into an issue faced at a client that I have not experienced when testing it out (the worst kind of error, in my opinion).
Here's the code:

Dim objIE as Object ' late binding
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Visible = False
.Silent = True
.Navigate myurl
Do While .ReadyState <> 4
'etc. - code to bomb out if the site can't be found
mytext = .Document.Body.InnerText

When I tested the code, Internet Explorer never opened up, so I thought that the Visible property was set to hide the page (i'm using IE 8, XP). The client runs the code and IE opens up with the page that I've set to navigate to (client is on IE8, Vista). After a little reading on other sites and MSDN, it would seem that after .navigate method is called that the site is visible, so I should probably set the .Visible property AFTER navigating to the site. This brings up two questions that I need help to figure out....
1. Why did the client's IE open, not mine? I dug around the IE settings on my PC, and could not determine an option that would be set to cause this.
2. Will setting the objIE property to .Visible = False AFTER .Navigate just hide the page, but still allow the user to click over to IE and view it?
What I really need is for the program to navigate to the site, grab the text information from the file on the site, all in "stealth" mode - that is, the user is unaware of the process.
Thanks for any help!
Go to the top of the page
post Mar 2 2010, 01:52 AM

Posts: 1,177
Joined: 11-August 03
From: Denver - CO

Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    11th December 2019 - 07:12 PM