Tuesday, July 15, 2008

Outlook launch error regarding MSOC.DLL

I just upgraded from Outlook 2003 to Outlook 2007. I opened Outlook 2007 and I get a message that says "MAPI was unable to load the information service msoc.dll. Be sure the service is correctly installed and configured." I had to be quick to get it because it oddly disappears and it is not logged to the Windows event log. If you are getting this message it is likely I would say that you are using "Microsoft Office Outlook Connector for IBM Lotus Domino" plug-in for Outlook 2003. When you upgrade to Outlook 2007, the plug-in stays installed. When you open Outlook it tries to connect to the Domino server as it has always, and in Outlook 2007 this plug-in no longer works and appears to not be supported or have a likely shot of being upgraded to work with Outlook 2007. Make sure Outlook 2007 is quit and not hidden process is running (can use Task Manager to check for process called OUTLOOK.EXE). Do yourself a favor, go to Add / Remove Programs and remove "Microsoft Office Outlook Connector for IBM Lotus Domino". It does NOT work in Outlook 2007.This should uninstall the plug-in from Outlook I think. If that doesn't work you can do what I did before I uninstalled it. I just removed the plug-in from Outlook 2007 using Start Menu | Control Panel | Mail and then click the Email Accounts... button. This will take you to a tabbed window. Make sure the E-mail tab is selected. In the list of connections you should see something that indicates the Domino connection (sorry already deleted it so I can't reference the exact text). Highlight it and click the Remove button. Close the Windows and restart Outlook. This is in no way part of the solution, but I wanted to share it anyway. Here is some sample code that I toyed with to attempt to write my own .PST reader, but ended up with the same error when my code ran, and forced me to figure out what the real problem was (see above of course).
using System.Runtime.InteropServices;
using Outlook = Microsoft.Office.Interop.Outlook;

public partial class Form1 : Form
 public Form1()

 private void Form1_Load(object sender, EventArgs e)
  Outlook.Application app = new Outlook.ApplicationClass();
  Outlook.NameSpace NS = app.GetNamespace("MAPI");
  Outlook.MAPIFolder objFolder = 
  Outlook.MailItem objMail;

  Outlook.Items oItems;
  oItems = objFolder.Items;

   for (int i = 1; i < objFolder.Items.Count; i++)
    objMail = (Outlook.MailItem)oItems[i];
  catch (COMException ex)
   objFolder = null;
   objMail = null;
   app = null;


Riccardo Vallaro said...

Thank Thank thank you,

I have been looking for a solution the hole day and you solved the problem,

Thank you


Brent V said...

I'm so glad it helped you. It was definitely a pesky little thing that was not very much fun to track down.

Thank you for the feedback!