Is it possible to put signatures (simple texts) to the Word documents before the user starts downloading the file?


  • Why didn't you put signatures when the user uploads document? – Alexander Nov 4 '11 at 17:39

You could do this with a custom solution to manipulate the OpenXML (assuming 2007+ format).

There is an older MSDN blog post that details the following:

  • Reading the document into a byte array using the SPFile.OpenBinary method.
  • Creating a resizable MemoryStream object using the parameterless constructor of the MemoryStream class.
  • Writing the byte array into the MemoryStream.
  • Opening the document using the Open XML SDK. Trap the System.IO.FileFormatException when opening.
  • Modifying the document using LINQ to XML and the Open XML SDK.
  • Writing the document back to the document library.

Post is available here: http://blogs.msdn.com/b/ericwhite/archive/2008/12/12/modifying-open-xml-documents-using-the-sharepoint-object-model.aspx

You cant really control all the download methods, so you will want to capture it on upload to make your changes.

| improve this answer | |

You might be able to utilize Information Rights Management to add labels to your Word documents when opened.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.