Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
233 views
in Technique[技术] by (71.8m points)

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

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)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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} 
    
    
  • 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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...