none
System.Runtime.InteropServices.COMException CLSID {000209FF-0000-0000-C000-000000000046} Error: 80040154 RRS feed

  • Question

  • I got the following exception.

    "System.Runtime.InteropServices.COMException (0x80040154):
    Retrieving the COM class factory for component with CLSID
    {000209FF-0000-0000-C000-000000000046} failed due to the following error:
    80040154."

    i got error at this code

    "Word.Application objWord = new Word.Application();"

    whats the actual issue is? and how to solve this?


    J.H.Ramavat
    Wednesday, December 8, 2010 12:23 PM

Answers

  • <<Word is installed on my machine but not at server.>>

    Well, that's the problem: you need to install Word on the server. But please note that server-side automation of Office applications is neither recommended nor supported by Microsoft:

    Considerations for server-side Automation of Office

    http://support.microsoft.com/kb/257757/en-us


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by RamavatJignesh Friday, December 10, 2010 7:38 AM
    Thursday, December 9, 2010 10:21 AM
    Moderator

All replies

  • Impossible to say without a lot more context.

    What kind of application is this?

    Is Word installed on the machine where this code is executing?

    What version of Word?


    Cindy Meister, VSTO/Word MVP
    Wednesday, December 8, 2010 6:53 PM
    Moderator
  • Hello Cindy Meister,

    I am creating C# console application in which i am using word to Html functionality by using Interop.Word.dll.

    At my machine its working fine but when i execute it on my server, it gives me this exception.

    Word is installed on my machine but not at server.

    Thanks alot.


    J.H.Ramavat
    Thursday, December 9, 2010 5:25 AM
  • <<Word is installed on my machine but not at server.>>

    Well, that's the problem: you need to install Word on the server. But please note that server-side automation of Office applications is neither recommended nor supported by Microsoft:

    Considerations for server-side Automation of Office

    http://support.microsoft.com/kb/257757/en-us


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by RamavatJignesh Friday, December 10, 2010 7:38 AM
    Thursday, December 9, 2010 10:21 AM
    Moderator
  • Hello Cindy Meister,

    At my machine, Word 2000 is installed and on my server machine if i install Word 2003 then if any error occurs?

    I am giving reference of MSWORD9.OLB.

    Thanks,


    J.H.Ramavat
    Friday, December 10, 2010 7:38 AM
  • I'm afraid your question is not stated clearly enough.

    But as this appears to be a new question/topic, it would be better for you to start a new message thread. That way more people who could provide help will see that question.

    When you ask a question about an error, please also include the text of the error message.


    Cindy Meister, VSTO/Word MVP
    Friday, December 10, 2010 8:27 AM
    Moderator
  • I have a similar problem to the original post (same error).  I do not have office installed on the server (not allowed to do that) but I did try to install the MS Office 2010 Primary Interop Assemblies.  If the PIAs installed properly, should that be sufficient to allow my application to call: 

    Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();

     

    (I'm trying to determine if the install of the PIAs just didn't go right or if I have to have office installed no matter what)

     

    Thanks.

    Thursday, May 26, 2011 4:07 PM
  • @aTmBonfire

    Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();

    Calls the installed office Word application instance. If you wont install it, per sure your call will fail with the exception in thread.  You need to install atleast any version of the office for the call to get succeed.

    As an alternative approach, try using Open XML, which wont need any interops / office to get work with.  It has almost all the features at the cost of little more code.

    http://msdn.microsoft.com/en-us/library/bb448854.aspx

    Thursday, May 26, 2011 7:52 PM
  •  

    1) Goto Control panel -> Administrative Tools -> Component Services 2) Expand Tree by clicking on Component Services -> Computers -> My Computer -> DCOM Config 3) Search CLSId 00020906-0000-0000-C000-000000000046 (which is for word application) 4) By selecting 00020906-0000-0000-C000-000000000046 this CLSId now right click on Properties 5) In the Propeties area, click on Security TAB 6) Select Customize option from all (Launch and Activations Permissions, Access Pemissions, Configuration Permissions) 7) Add new name as NETWORK SERVICE in all, and Allow all permissions for this name 8) Go to Identity TAB in the same properties area, select option as a This user and then add username (which is administrator of this machine) and password. Click on Apply, Ok 9) Refresh Component Services and check your application is working fine or not.

    Tuesday, April 29, 2014 6:24 AM