Different version of IE comes up

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
EnderFFX
Pro Scripter
Posts: 92
Joined: Mon Mar 08, 2004 6:17 am

Different version of IE comes up

Post by EnderFFX » Wed Jun 14, 2006 6:15 pm

When I use this command

Sub CreateIE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible=1
End Sub

I get a different Internet explorer popping up, specifically, a lot of the sub menus don't work. For example, the Internet options under tools will not pop up.

I'd like to get the version of IE to pop up that I have on my desktop, any suggestions?

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Fri Jun 16, 2006 12:35 pm

Is this what you're talking about?

Code: Select all

VBSTART
Sub OpenPage(URL,Wait)
  Dim IE
  Set IE = CreateObject("InternetExplorer.Application")
  IE.visible = 1
  IE.Left=0
  IE.top=0
  IE.width=800
  IE.height=572
  IE.toolbar=1
  IE.menubar=1
  IE.resizable=1
  IE.statusBar=1
  IE.navigate URL
  do while IE.Busy and Wait
  loop
End Sub
VBEND

Let>URL=http://www.mjtnet.com/usergroup/viewtopic.php?p=12303#12303
VBRun>OpenPage,%URL%,1



Here is a simpler way

Code: Select all

Run Program>C:\Program Files\Internet Explorer\iexplore.exe "http://www.mjtnet.com/usergroup/viewtopic.php?p=12303#12303"
If your local drive is not on the C: drive (in my case it is on the my D: drive) you can do it this way.

Code: Select all

StringReplace>WIN_DIR,:\WINDOWS,,DRIVE
Run Program>%DRIVE%:\Program Files\Internet Explorer\iexplore.exe "http://www.mjtnet.com/usergroup/viewtopic.php?p=12303#12303"

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Jun 16, 2006 3:31 pm

It took some playing but now I can see what EnderFFX means :) If you just do the CreateIE without opening a page, then some of the menu items don't work (which is probably logical). But if you do the next step and navigate somewhere then everything is fine. The advantage of the CreateObject method of opening IE is that it will correctly wait until the page is loaded, and runprogram can't do that.

VBSTART
Dim IE
Sub CreateIE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
End Sub

Sub Navigate(URL)
IE.navigate URL
End Sub

Sub WaitBusy
do while IE.Busy
loop
End Sub

Sub DestroyIE
IE.Quit
Set IE = Nothing
End Sub

VBEND

VBRun>CreateIE

VBRun>Navigate,http://www.yahoo.com
VBRun>WaitBusy
Wait>2

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts