Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netoffice progid not found

I've done find and replace solution in Micorsoft.Office.Interop.Word in asp.net I would like to move this solution on NetOffice in my asp.net server where there is no Microsoft Word. I got error

progid not found

. What I do wrong because on my computer where I have Microsoft Word this code work fine in NetOffice?

Word.Application wordApp = new Word.Application(); <-- here is this error

like image 465
Daniel Avatar asked Oct 20 '25 08:10

Daniel


1 Answers

NetOffice is just a COM Wrapper to the office applications, therefore it requires that you have the office app installed on the machine where your application is running.

i.e. You need to have Microsoft Word installed on any machine that you intend to run an app that uses NetOffice.Word.

If this was a desktop app, all you would have to do, would be to install Word on the machine, but given you want to use office automation from a server, and Microsoft does not recommend it, you should look into other options of interfacing with Word documents directly via OpenXML without having to install Word on the machine.

I'd recommend taking a look at the DocX library: https://github.com/WordDocX/DocX

As well as the articles below:

  • How to: Create a word processing document by providing a file name (Open XML SDK)
  • Edit Word Documents using OpenXML and C# Without Automation/Interop
like image 71
C. Augusto Proiete Avatar answered Oct 22 '25 00:10

C. Augusto Proiete