Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetObject with IE doesn't work 1

Status
Not open for further replies.

DocPoster

Technical User
Jun 10, 2004
6
US
Searched tons of threads and MS KB articles, but can't figure out why I'm having this problem. Others have posted the following code, but they don't seem to get the error message 429, "ActiveX component can't create object" like I do.
Code:
Dim appIE As Object
Set appIE = GetObject(, "InternetExplorer.Application")
IE 6 is already open when I call this from VBA in Word 2000 SP-3. If I call CreateObject, it works fine. Also tried it with "Dim appIE As SHDocVw.InternetExplorer" with the same result. If I call GetObject(, "Excel.Application"), it works fine.
 
DocPoster,
[tt]GetObject()[/tt] and Internet Explorer can be problematic since [tt]InternetExplorer.Application[/tt] will return instances of Windows Explorer and Internet Explorer (usually the first one opened, which should be your Desktop).

You might try something like this to locate the actual IE window:
VBForums: got hold of ie

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Thank you so much; that's exactly what I needed. I'm going to post a solution to my problem using some of that code. What I really wanted to do was look for an existing browser with a specific URL and automate it; i.e., hook into it rather than open a new browser.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top