Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

Thanks.

share|improve this question
    
Why didn't you put signatures when the user uploads document? –  Alexander Nov 4 '11 at 17:39

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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