none
Integrate Word doc into ASP MVC3 app RRS feed

  • Question

  • Let me know if I need to post elsewhere.  

    I am building an asp mvc3 web app.  I have a word document currently sitting on our sharepoint server.  The document is a single page legal doc that will be printed on company letterhead.  I need to allow my web app user to insert a paragraph into the document, and print it.  It does not need to be saved.

    I can put the document anywhere, it does not even have to be a word doc.  I just need the end result.  I have been looking into doing this with either a Word doc, or the new Office Web.  

    Please let me know where I should start as far as research.  I need to know the technical deets on how to do it, but also need to know if I have to load office on my web server, what licensing issues are there, etc.  The web app is internal and will be used by about 150 people.

    Thanks.


    Simon.

    Wednesday, June 26, 2013 8:40 PM

Answers

  • HI blattFrog

    Talking just Word document, file format 2007 or later, best would certainly be for you to leverage the Word Open XML file format. This is a standard Zip package (System.IO.Packaging namespace) of XML files that can be opened/read/manipulated. You can use the Open XML SDK as a useful intermediate, or work directly with Packaging and standard XML namespaces. The file format is an open, documented ECMA standard. See also OpenXMLDeveloper.org

    This is the recommended way to do anything with an Office document on the server. It should be no problem to add a paragraph to any document to which you have file permissions to access. Note that, unless you make a copy of the file and work with that, any changes would be saved to the original.

    For printing, since you have SharePoint, I recommend you look at Word Automation Services.

    For this scenario, assuming your company has SharePoint licenses already that support Word Automation Services, there's no need to purchase, install or license anything in addition.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, June 27, 2013 2:46 PM
    Moderator