"Set objOL = New Outlook.Application" cannot find the application

timvans

New member
Local time
Today, 12:21
Joined
Sep 9, 2007
Messages
6
Hello all.
I have a problem and hope you can help me. These commandlines give the error "Cannot find the application":
Code:
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:
naamloos.JPG


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

Thanks in advance,
Tim van Steenbergen
 
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.
 
Refreshing the references does not help

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
 
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
 
Still not connecting

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
 
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
 
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
 
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

Here’s one from VBForum

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
 
have you tried:
Code:
objOutlook = CreateObject("Outlook.Application")
 

Users who are viewing this thread

Back
Top Bottom