[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 990
  • Last Modified:

Error in loading DLL

I have a VB script within Excel that references Microsoft Outlook 9.0 Object Library Located in C:\Program Files\Microsoft Office\Office\MSOUTL9.OLB.  When I run the script and hit the statement:

Set ojbOL = New Outlook.Application

 I get a runtime error 48 that says "Error in Loading DLL".

There is nothing wrong with the code as I have run this script several times in the past and it worked just fine.  Moreover, I can run the script without any problems on other computers.  There have been no updates or new installations on this computer.  The only change that had been made was the file "Msoutl.olb" was copied into the same directory as the msoutl9.olb.

I have tried to re-install Outlook and Excel but it has not resulted in any progress.  I have also tried copying over the dll's from other computers where the script will run but I still get the same error.

Please Help!

0
freejaso
Asked:
freejaso
  • 8
  • 7
1 Solution
 
Mikal613Commented:


Set ojbOL = CreateObject("Outlook.Application")
0
 
freejasoAuthor Commented:
Not sure what you mean?

Isn't this the same thing:

dim objOL as New Outlook.Application
set objOL = New Outlook.Application

Anyway... I tried to change it but I still get the same error.  Again, this code is working fine on other computers.

Thanks
0
 
Mikal613Commented:
he doesnt have outlook installed on his computer
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Mikal613Commented:
C:\Program Files\Microsoft Office\Office\MSOUTL9.OLB

try registering the OLB  first

regsvr32  C:\Program Files\Microsoft Office\Office\MSOUTL9.OLB
0
 
freejasoAuthor Commented:
Ok I tried to register it and it says:

MSOUTl9.OLB was loaded, but the DllRegisterServer entry point was not found

MSOUT9.OLB does not appear to be a .DLL or .OCX file

I am not sure why it would be corrupt.  I just copied this file from another computer where the programming is running just fine.  What am I misssing??
0
 
Mikal613Commented:
what version of Internet explorer is he running?
0
 
freejasoAuthor Commented:
6.0.2800.1106

Not sure was IE has to do with this.

And yes.. Outlook is installed on this computer.
0
 
Mikal613Commented:
Do you have Access from Office XP and Outlook from Office 2000 (or standalone Outlook 2000)?  Mixing and matching programs from different Office versions can be problematic.

0
 
freejasoAuthor Commented:
Everything is from Office 2000.
0
 
Mikal613Commented:
another solution

go to Start/Programs/Microsoft Visual Studio 6/Microsoft Visual Studio 6 Tools/Depends.

Using this program "Dependency Walker", you can select a dll and it will go out and tell you what other dll's it needs.  It highlighted a couple of dll's that I needed and copy them into the directory that your working on.


0
 
freejasoAuthor Commented:
I don't have "Dependency Walker" installed.  Can you just tell me what other files I need?
0
 
Mikal613Commented:
send me the exe  vbguru613  at gmail.com
0
 
freejasoAuthor Commented:
It is not an .exe  ......  It is a VB script within Excel.
0
 
Mikal613Commented:
MSVBVM60.dll
KERNEL32.DLL
USER32.DLL
GDI32.DLL
ADVAPI32.DLL
OLE32.DLL
OLEAUT32.DLL
rpcrt4.DLL
MSVCRT.DLL
0
 
freejasoAuthor Commented:
FOUND THE SOLUTION!!!!!!!

I searched in my registry for "msoutl.olb"  I found a reference to it and changed it to "msoutl9.olb".  Now everything is working great.  I guess when I copied "msoutl.olb" into the same directory something picked it up and all the uninstalling and re-installing would never change it.

Thanks for your help!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now