ASP.NET 2.0 Word interop assembly

G

Guest

I'm developing a ASP.NET 2.0 web application which exports and imports Word
documents.
The functionality is implemented in a DLL project which is referenced by the
web application.
In the DLL I've added a reference to the COM Microsoft.Word 11 Object
library and set the property Copy Local to true which created an interop
assembly in my output directory.

When I publish the website and add the interop assembly to the bin directory
and deploy it to a win2003 server (without office 2003) the word
export/import functionality generates an error:

Retrieving the COM class factory form the component with CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80040154.

In other words: Component not registered.

I don't want to install Office 2003 to my server! But how do I implement the
Word export/import functionality using the Interop Assembly and without
installing Office 2003 on the server?

With regards,

Dustin van de Sande
 
S

Steve C. Orr [MVP, MCSD]

To use COM Interop with Word on your server, you must install Word on your
server.
But I (and Microsoft) don't recommend using COM Interop with Office on the
server. It wasn't designed to be used that way.

Here are some tips and suggestions for working with Word (and Excel) the
right way:
http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/ExportPanel.aspx
http://SteveOrr.net/reviews/AsposeWord.aspx
http://SteveOrr.net/reviews/OfficeWriter.aspx
http://msdn.microsoft.com/office/understanding/vsto/
 
G

Guest

Thank you for your response Steve.
Indeed you need to install Office or a third party component with ASP 1.1.
But with ASP 2.0 it must be possible to use VSTO to generate the word
document.
Your answer brought me a step further to the solution, but if anyone else
can assist in how using VSTO to do this I would be gratefull.

Dustin van de Sande.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top