It is not possible to create Excel and Word COM objects on the leased server. There is a code that could be transferred, but this code is implemented via the COM interface.

Is there any way to get around this problem or will you have to rewrite everything?

UPD
We'll have to rewrite. Consideration for server-side Automation of Office .

  • one
    COM objects will work ONLY on a server with windows OS and only with Word / Excel installed - Alex Kapustin
  • Yes. The project needed to include only 2 links: 1. Microsoft Office 12.0 Object Library (MSO.DLL) 2. Microsoft Word 12.0 Object Library (MSWORD.OLB) if you carry them with you? Copying these files into `~ \ Bin` did not help. - Ildar

2 answers 2

If you create an object through COM, for example, Word.Application, then you cannot do without an established office.

If you open a document through OLE DB (also COM as a matter of fact), then it is enough to install AccessDatabaseEngine on the server (pay special attention that the 32-bit version does not work in a 64-bit process)

UPDATE Through OLE DB, you can accurately open xls, I did not check about doc.

  • Create Word.Application . And what, and Word documents through OLE DB can be opened? - Ildar
  • And rightly, OLE DB is more related to Excel, so it corrected the answer. - Tolyandre 6:43 pm

If there are no installed COM components, then the program using it will not be able to use them - accordingly, you will not be able to generate DOC files.

So you have to rewrite everything or find a way to install COM objects.