View Full Version : "Set objOL = New Outlook.Application" cannot find the application


timvans
09-09-2007, 11:59 AM
Hello all.
I have a problem and hope you can help me. These commandlines give the error "Cannot find the application":
Public Sub Getmail()
Dim objOL As Outlook.Application
Set objOL = New Outlook.Application

How can I make it work?
I have access 2007, Oulook 2007, windows XP.

It has been working for a while, but after removing the Norton Antivirus Software from my pc (it was herassing my mail) it started to give this error.

I have several add-ons selected as you can see in the image:
http://mijn.speedlinq.nl/naamloos.JPG

Does anybody know what I need to do to make it work again?

Thanks in advance,
Tim van Steenbergen

RuralGuy
09-09-2007, 01:58 PM
Uncheck the Microsoft Outlook 12.0 Object Library reference and press OK. Then go back in and select it again. This will cause all of the references to refresh.

timvans
09-10-2007, 10:56 AM
Thanks for the tip. I tried it but unfortunately refreshing the references does not help.

Does anybody know how I can make Access find the application Outlook?

Best regards, Tim

unclejoe
09-10-2007, 10:58 PM
Hi Tim,

You sure that the referances is correct? Look at it again, does it the word "Missing" just after the check box?

You might have to get a copy of that file from another working PC and put it into the correct folder.

Thanks for the tip. I tried it but unfortunately refreshing the references does not help.
Does anybody know how I can make Access find the application Outlook?
Best regards, Tim

timvans
09-13-2007, 12:07 PM
Hi UncleJoe,

No luck. It is really there, right in the directory where it wants to be.
I tried to mess around with the file MSOUTL.OLB, putting it in another directory or renaming it, but that resulted in not accepting the reference again. Only when I put it back on its original position, with its original name, VB put the reference back on the list.

Any other ideas? Is it possible that it is not related to these references?

Best regards,
Tim van Steenbergen

unclejoe
09-16-2007, 04:51 PM
Hi Tim,

Maybe you need to re-register the "dll" or "ocx" again.

Click "Start", "Run", in the field...

Regsvr32.exe "C:\SomewhereFolderofDLL\YourDLL.dll"

Hi UncleJoe,
No luck. It is really there, right in the directory where it wants to be.
I tried to mess around with the file MSOUTL.OLB, putting it in another directory or renaming it, but that resulted in not accepting the reference again. Only when I put it back on its original position, with its original name, VB put the reference back on the list.
Any other ideas? Is it possible that it is not related to these references?
Best regards,
Tim van Steenbergen

timvans
09-18-2007, 12:56 PM
Hi UncleJoe,

I tried to register it using:
regsvr32.exe "C:\Program Files\Microsoft Office\Office12\MSOUTL.OLB" and
regsvr32.exe "C:\Program Files\Common Files\MicrosShared\OFFICE12\MSO.DLL"

Both times it responded with two messages:
" <file> is loaded, but the entry-point DllRegisterServer is not found" and
" <file> is appearently not a .dll or .ocx-file

In the mean time I tried the same program
Dim objOL As Outlook.Application
Set objOL = New Outlook.Application
in a VB6-project that includes a reference to the "Microsoft Outlook 12 Object Library" and got the exact same problem.

Best regards,
Tim van Steenbergen

unclejoe
09-18-2007, 05:49 PM
Hi Tim,

There are many possible cause of this problem. For Example, corrupted files or the file in memory and being in use. (Have you installed any “.Net” applications lately?) And (You sure that “MSO.DLL” is the correct file? Should it be “MSO12.DLL” or "MSOUTL12.OLB"? I don’t have Access 2007.)

Sometimes you need to register the file in multiple places as you have VB6 and Access 2007 installed. One possible place is “C:\WinNT\System\” or “C:\WinNT\System32\”. It may or may not work in your case.

I have google the error messages you have posted. It appears that there are many solutions and possible causes.

Here’s from MS (http://support.microsoft.com/kb/249873)

Here’s one from VBForum (http://www.vbforums.com/archive/index.php/t-296693.html)

I would suggest you do a google search about this problem as this also require you to modify your registry.

My search indicates that this is more of a problem with ".Net" issue.

Hi UncleJoe,
I tried to register it using:
regsvr32.exe "C:\Program Files\Microsoft Office\Office12\MSOUTL.OLB" and
regsvr32.exe "C:\Program Files\Common Files\MicrosShared\OFFICE12\MSO.DLL"
Both times it responded with two messages:
" <file> is loaded, but the entry-point DllRegisterServer is not found" and
" <file> is appearently not a .dll or .ocx-file
In the mean time I tried the same program
Dim objOL As Outlook.Application
Set objOL = New Outlook.Application
in a VB6-project that includes a reference to the "Microsoft Outlook 12 Object Library" and got the exact same problem.
Best regards,
Tim van Steenbergen

Guus2005
09-20-2007, 05:14 AM
have you tried:

objOutlook = CreateObject("Outlook.Application")