MOSS 2007 - Show SharePoint Version Number in MS Word Documents

3 minute read

UPDATE: I've just verified this technique also works with SharePoint 2010. Also keep in mind this technique only seems to work for documents in MS Word 2007 .docx format. I assume it will also work in MS Word 2010, but I have not tested that yet.

UPDATE 2: I should have posted this sooner, but I have run into problems on SharePoint 2010 with sites that are heavily customized (sites from MOSS 2007 that had been heavily customized before being upgraded to 2010, then copied to create new sites) getting versioning to work as described below. I havent been able to determine what the problem is or how to fix it yet.

One of the requirements here at work is that we normally save the current "version number", which is user entered and maintained, into word documents that go out to clients. At some point, someone ends up forgetting to update the version number and version history, but they always have to enter that information into SharePoint when they check the document in. So, how can we automatically insert that information into a word document from SharePoint?

Sadly, there is no easy "out of the box" way to do this. The version number you see in the properties of a word document is MS Word's own internal version number that does not relate to the SharePoint version number in any way.

One solution I've found to work well is setting up an information policy on the document library in order to enable labels. You can then define a label that displays the current version number, which you can then insert into a MS Word 2007 document as an image (it seems to look best in the document footer, imo). Here's how:

  1. Create a new document library or modify an existing one
  2. In the library settings, under "Advanced Settings" set "Allow management of content types?" to "yes".



  3. Enable versioning (it does not matter if you do minor versions or not).



  4. Create a new information policy on the library, and select the content type you want the label to be available to (I use the default "document" type).


  5. Define a new policy, check "Enable Labels". Do not check the other two options Below it. In the "Label format" field, enter something like "SharePoint Version Number: {Version}". {Version} is the field that will display the version number. Modify the "Appearance" settings to suit your needs, then click "OK".




I typically set the size of the label to something thin, like .5 inches, so I can tuck it into the footer of the word document and still keep the footer small. Now, the label will not automatically show up in your documents, you still need to insert the label yourself. And so far, it seems this feature only works with Word 2007 documents, my 2003 word documents just display a field name rather than a number. Anywho, to setup your word document:

  1. Create a new document in the library.
  2. Save the new word document as a word 2007 file (.docx format) in the library.


  3. Check out and edit the word 2007 document, click the "insert" tab in the ribbon, then click "Quick Parts" in the "Text" button group. Under "Document Properties" click on "Label" to insert your SharePoint label as an image.


  4. save your document, checkin and close word 2007. Then re-open the document and you should see the label change to the actual SharePoint version number of the document.

..and one last thought - Since the format of the text for the version number label might change due to personal preference (some might want to use "SharePoint Version Number: x", while others use "Version: x") it may be a good idea to simply display the version number only, as a small image by itself with no additional text. This way the document author has more control over how the version number is displayed and described in their document.