2

i am getting the following error while trying to open a Microsoft word document from within a c# VS.NET 2010 windows forms application.

"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))."

I am using a Windows 7 64 bit OS.

I have added the Microsoft.Office.Interop.Word in the project > references

i have set the Build platform to target x86 enviroment

using Word = Microsoft.Office.Interop.Word;
var wordApp = new Word.Application() {Visible = true}; <-- ERROR

What am I doing wrong?

3
  • Seems that you have not MS Office installed on that machine. Commented Aug 2, 2011 at 9:19
  • I have Microsoft word Starter 2010 installed on my PC. Should that make a difference? Commented Aug 2, 2011 at 9:21
  • is word installed in 32 or 64 bits ? Commented Aug 2, 2011 at 9:24

2 Answers 2

2

It seems that Word starter edition doesn't support automation.

Sign up to request clarification or add additional context in comments.

Comments

0

It seems that either

  • Word is not (correctly) installed on the machine, or
  • the platform target of your application is not set to x86 (you can do so under Project -> Properties).

Both are required for Word automation to work on an x64 system.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.