Error Loading DLL, msoutl.olb, Access97

G

Guest

I am getting "Error on loading DLL".
This occurs when I try to connect to Outlook.

I am using Access 97, and we have Outlook 2003 installed on this server.

I have added the reference to 'Microsoft Outlook 11.0 Object Library'. It
adds the reference without an error.

I have the following code.. (trimmed to the 2 relavent lines.)
Dim olApp As Outlook.Application
Set olApp = Outlook.Application '<- this gives the "Error in loading DLL"
message.
' Set olApp = CreateObject("Outlook.Application") ''tried this it also
failed

DEBUG-COMPILE compiles OK.

Reading through the various newsgroups I have tried
regsvr32.exe "C:\Program Files\Microsoft Office\Office11\msoutl.olb"

but this replies that "this is not a DLL or OCX file", so this fails.

Any ideas on what I can try now?
Thanks
Simon Westenra
Wellington, NZ
 
D

Douglas J. Steele

You could try removing the reference completely, and then use Late Binding:

Dim olApp As Object

Set olApp = CreateObject("Outlook.Application")

The downside of this is that none of the Outlook constants will be available
to you: you'll have to either define them yourself, or use the numbers in
your code.
 

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