Automation Error with IE 8 in Access 2007

A

Adrian Jones

I've a database which imports data from a form in an HTML. Yes, I know, it's
a convoluted and inefficient way of doing things, but that's what I inherited
and I've not had the time to re-write it yet. And it works. Or it did until
my PC was upgraded.

With Access 2003 and Internet Explorer 7 the following would create an
HTMLDocument object from which I could extract the field values:

Dim TheBrowser As InternetExplorer
Dim TheDocument As HTMLDocument

Set TheBrowser = CreateObject("InternetExplorer.Application")
TheBrowser.Visible = True
TheBrowser.navigate url:="C:\TestFile.html"
Set TheDocument = TheBrowser.Document

Now I have Access 2007 and IE8, it works up until I send navigate to
TheBrowser. The page loads correctly, but every varaiable in TheBrowser
becomes "<Automation Error>".

So, obviously, trying to extract Document from TheBrowser fails with an error:

Run-time error '-2147023179 (800706b5)'

Automation Error
The interface is Unknown


I've searched for some explanation on-line, but to no avail. Has anyone else
come across this problem? And hopefully found a soluton?

Thanks in advance,

Adrian
 
J

JP

I'm not sure how you would do it in '07, but the '03 equivalent would
be to go to Tools > References in the VB IDE and make sure that your
InternetExplorer reference is pointing to shdocvw.dll and not
something else. I believe IE8 changes the reference to another file.

--JP
 
A

Adrian Jones

Hi JP,

I've attempted to add a reference to shdocvw.dll, but Access doesn't seem to
want to add it. I hit Open, the file dialog closes and nothing changes in the
list.

I've since managed to try the database on a machine with Office 2003 and
IE8, and it was able to open and read an HTML file without a problem. So it
appears the problem lies within Access 2007.

Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top