tags:

views:

442

answers:

2

I am trying to create a PowerPoint presentation from inside a C# .NET application.

For the most part it is working, but every once in a while I am seeing this error in my logs:

Creating an instance of the COM component with CLSID
{91493441-5A91-11CF-8700-00AA0060263B} from the IClassFactory failed due
to the following error: 80010108.

The line that triggers this exception is:

Microsoft.Office.Interop.PowerPoint.ApplicationClass oPPT =
         new Microsoft.Office.Interop.PowerPoint.ApplicationClass();

Does anyone know what this means and how I can avoid it?

+2  A: 

The error message means: "The object invoked has disconnected from its clients".

Try creating the object using

    ApplicationClass oPPT = (ApplicationClass)Activator.CreateInstance(typeof(ApplicationClass));
RichAmberale
+2  A: 

The error code represents the error RPC_E_DISCONNECTED. There are many reasons this particular error code can occur and we'd need a bit more information to understand what's going on.

If you have any more data plug it into google with RPC_E_DISCONNECTED and you'll likely get a lot of results. There appear to be a lot of articles related to office, managed code and RPC_E_DISCONNECTED

JaredPar