2

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

Thanks.

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

2 Answers 2

3

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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