0

I am using Microsoft.Office.Interop.Word to read text from MS-word (doc/docx) file using c#. When I am running my apps under admin account then no problem is occurring but when I am running under a user which has not admin privilege then this below error occur. I am running my apps on windows 2008 64 bit.

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

So please guide me what kind of permission I need to give to the user as a result com exception should not occur when I will read a doc/docx file programmatically by c#. Please discuss in details what are the steps I need to follow. Thanks.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Thomas
  • 33,544
  • 126
  • 357
  • 626
  • I believe one simple solution will be run both as administrator or run both as normal privilege level – Rohit Apr 16 '13 at 11:25
  • when run as admin then no prob occur but when run as normal user then problem occur. my win form exe is invoke by win schedular. – Thomas Apr 16 '13 at 11:46
  • Have you considered running your application permanently in admin mode? – Rohit Apr 16 '13 at 12:06
  • my prob solved just following this link http://stackoverflow.com/questions/1491123/system-unauthorizedaccessexception-retrieving-the-com-class-factory-for-word-in/3491486#3491486 – Thomas Apr 16 '13 at 15:00

0 Answers0