Update the content of an existing word document and save it back to the document libirary RRS feed

  • Question

  • Hi,

    I would like to know how I can update the content of an exisitng word document in a document library and then save it, and I think in every save, it will keep the versioning as long as I enabled it the document library.

    Please adviice. Thanks in advance.

    Friday, March 23, 2012 2:27 AM


  • Hi,

    First of all, you need some components (like ) which can manipulate word document. Or you need some openxml library to do the manipulation. So select some free/commercial component to manipulate the word document. Once you select the component, you can write code and test the code in any application (like console, windows etc) to manipulate the docs. Once your code is ready you can integrate the code in sharepoint (in event receiver, application page etc).

    About versioning, you can enable versioning in document library. And during saving the document back, use update method instead of systemupdate. SystemUpdate method of SPListItem doesn't update modified date and version. However, Update method updates the modified date and version.

    Sohel Rana

    • Marked as answer by Shimin Huang Thursday, March 29, 2012 2:09 AM
    Friday, March 23, 2012 8:36 AM