How can I include value of sharepoint's version column in a word document?

Daniel LeCheminant picture Daniel LeCheminant · Feb 3, 2009 · Viewed 76.8k times · Source

I'm trying to work out a way to display the contents of the version column from SharePoint (i.e. the value that changes every time a file is checked in) as a field (or something similar) inside of a Word document.

Ideally, I'd like to know how to configure SharePoint so I could click something like "Insert > Quick Parts > Document Property > Version", and it would include the version in the document. The goal is to make it easier for someone to correlate a printed version of a document with the version history of SharePoint.

I have been able to add editable text columns to the Document content-type and have them show up as document property quick parts. I've also been able to add a calculated column which gets the version as a text string... however this calculated column isn't showing up in Word as a document property. (Perhaps I'm missing a setting on the calculated column)

Answer

Erwin picture Erwin · Feb 26, 2009

This is one way to get the version in your document, it's a bit painful to get it working...

  • Enable versioning and content types on your document library.
  • Go into document library settings and select the content types you want the version to appear in.
  • Select Information management policies settings from the content type menu.
  • Select define a policy and click .
  • Click on the 'Enable Label' Check box
  • Do not Check the other two boxes in the Labels section.
  • In the Label Format field, enter the metadata fields in the following format:

     Version : {Version} \n
    
  • Set the label appearance and click on preview.

  • Click at the bottom of the page.
  • Go back to the library and create a new document using the content type you have modified.
  • Save the file as a Word 2007 format.
  • Select the insert tab
  • Select Quick Parts from the Ribbon menu and hover over document property
  • Select Label from the properties list
  • This should display the metadata defined in your label as a field in your word document. The field will update automatically when you next open the document.
  • Save.