How to Connect to Current Instance of IE 
Author Message
 How to Connect to Current Instance of IE

Hello,

I wonder if someone knows how to connect to current instance of IE.

GetObject and CreateObject don't seem to work at all (i tried with all
possible variations of parameters )

Thanx in advance



Mon, 04 Mar 2002 03:00:00 GMT  
 How to Connect to Current Instance of IE
Add a reference to Microsoft Internet Controls and use the ShellWindows
object:

Dim SW As ShellWindows, IE As InternetExplorer

    Set SW = New ShellWindows

    For Each IE In SW
        Select Case TypeName(IE.Document)
            Case "HTMLDocument"
                MsgBox "IE Window. URL: " + IE.LocationURL
            Case "IShellFolderViewDual"
                MsgBox "Explorer Window. Path: " + IIf(IE.LocationURL = "",
IE.LocationName, IE.LocationURL)
            Case Else
                MsgBox TypeName(IE.Document) & " Window"
        End Select
    Next

--
Eduardo A. Morcillo
Create your own shell extensions with VB
Free ActiveX Controls, TypeLibs & Code
http://www.geocities.com/SiliconValley/Foothills/9940

Quote:
> Hello,

> I wonder if someone knows how to connect to current instance of IE.

> GetObject and CreateObject don't seem to work at all (i tried with all
> possible variations of parameters )

> Thanx in advance



Mon, 04 Mar 2002 03:00:00 GMT  
 How to Connect to Current Instance of IE
Have anyone run this sample succesfully??

When I have tried to run this I get an 429 error in the line

Set SW = New ShellWindows

Regards



Quote:
> Add a reference to Microsoft Internet Controls and use the
ShellWindows
> object:

> Dim SW As ShellWindows, IE As InternetExplorer

>     Set SW = New ShellWindows

>     For Each IE In SW
>         Select Case TypeName(IE.Document)
>             Case "HTMLDocument"
>                 MsgBox "IE Window. URL: " + IE.LocationURL
>             Case "IShellFolderViewDual"
>                 MsgBox "Explorer Window. Path: " + IIf(IE.LocationURL
= "",
> IE.LocationName, IE.LocationURL)
>             Case Else
>                 MsgBox TypeName(IE.Document) & " Window"
>         End Select
>     Next

> --
> Eduardo A. Morcillo
> Create your own shell extensions with VB
> Free ActiveX Controls, TypeLibs & Code
> http://www.geocities.com/SiliconValley/Foothills/9940


> > Hello,

> > I wonder if someone knows how to connect to current instance of IE.

> > GetObject and CreateObject don't seem to work at all (i tried with
all
> > possible variations of parameters )

> > Thanx in advance

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Sat, 09 Mar 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Minitoring Current URL in another IE Instance

2. The current Instance or a second instance?

3. Error 80010108 starting IE from VBScript with prior IE instances open

4. Launch IE or Grab IE Instance

5. Nubee Needs Help I.E. Current http Address

6. Reference to current instance of Word

7. set focus on current instance of application

8. Navigate to folder in current Windows Explorer instance

9. ASP - create in just script instance of class provided in current page with different language

10. Get current instance of Internet Explorer

11. Get a reference to the current Visual Basic Instance

12. Get a reference to the current Visual Basic Instance

 

 
Powered by phpBB® Forum Software