Can Microsoft.office.interop.word.dll work without installing office?

13,238

No, the Interop libraries are just a shell over the real Office library code. Thus you need to have Office installed where your app is running

Also I totally agree with the comment above from John Saunders. You really should avoid to use these wrappers on a server application.

Share:
13,238

Related videos on Youtube

Vaishali Bulusu
Author by

Vaishali Bulusu

Updated on September 16, 2022

Comments

  • Vaishali Bulusu
    Vaishali Bulusu over 1 year

    My ASP.Net-C# application works with mailmerge and the dll by name Microsoft.Office.Interop.Word.dll V14.0.0.0. All is well on my desktop (where office is installed). However when this application is deployed on the production machine, the following error is thrown:

    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 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    When the class is registered, the following error is found:

    Microsoft.Office.Interop.Word.dll was loaded but the entry-point DLLRegisterServer was not found. Make sure, this is a valid dll or OCX and try again.

    How do I fix this problem? Office suite can't be installed on the production machine.

    • wgraham
      wgraham over 10 years
      Office is required to be installed if using Interop. What are you trying to do?
    • John Saunders
      John Saunders about 10 years
      It is a horrible idea to use Office Interop from ASP.NET or another server technology. These APIs were written for use in a desktop application, for automating Office (a suite of desktop applications). Server applications are different in many ways that make it a very, very bad idea to use Office Interop in them. It's also unsupported by Microsoft, and may violate your Office license. See Considerations for server-side Automation of Office