locked
How to use Microsoft.office interop.word in website RRS feed

  • Question

  • User320306162 posted

    Hi,

    I have a page which creates a word doc from templet

    string location = Server.MapPath("~/temp/" + filename);

    Application app = new Application();

    Document doc = app.Documents.Add(location);

    if(doc != null)

    {

    //Some code here

    }

    it works fine when i run from visual studio, but when i deploy it as a website in local IIS, its not working.I gave the permissions needed to access the folders in the website.

    What should i do to make it work.

    Thanks

    Saturday, August 28, 2010 1:02 AM

Answers

  • User-1659704165 posted

    Hi,

    Better Go for Openxml ..

    http://msdn.microsoft.com/en-us/library/bb497758.aspx

    http://openxmldeveloper.org/articles/OpenXMLDocFromDotNet.aspx

     http://msdn.microsoft.com/en-us/library/bb656295%28office.12%29.aspx

    Word Interop is Good for Standalone machince it is Not recommend for Servers

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 28, 2010 1:01 PM