views:

64

answers:

2

I have been trying to open a Word document using C# in VS2010. But I have been successful so far. I have tried searching for answers but all in vain. In the reference section, I cannot see the Microsoft Word office library (any version) in the COM tab. I added the Microsoft.Office.Interop.Word. version 14 from the .Net tab, but still i get the same exception:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

Additional information: 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)).

A: 

Word 2010 must be installed on the machine.

Lex Li
+2  A: 

You need to make sure that both Microsoft Office and Visual Studio Tools For Office (VSTO) are installed on the machine.

JaredPar