Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Microsoft.Office.Interop.Word in asp.net

I'm attempting to leverage the Microsoft.Office.Interop.Word dll in my asp.net application. Long story short, an internal web based document management/editing system requires access to a MS Word flesch-kincaid value on an ad-hoc basis. I have no problem using this dll in a console app, but I can't get the right permissions to it when accessed via asp.net.

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

I've tried everything in this forum thread with no luck. I'm using .Net 4.0 on Win7, I've tried both 32 and 64 bit versions of MS Word. I'm also anticipating more head-aches once I deploy to our server running Windows Server 2008 R2 Standard

like image 362
miniMan Avatar asked Feb 01 '26 21:02

miniMan


1 Answers

I would use the openXML SDK instead for the reason todda.speot.is gives

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124

http://www.codeproject.com/Articles/87711/Manipulate-Docx-with-C-without-Microsoft-Word-inst

like image 169
Micah Armantrout Avatar answered Feb 03 '26 12:02

Micah Armantrout



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!