如何在 Word 文档中包含 sharepoint 版本列的值?
我正在尝试找出一种方法,将 SharePoint 中版本列的内容(即每次签入文件时都会更改的值)显示为 Word 文档内的字段(或类似内容)。
理想情况下,我想知道如何配置 SharePoint,以便我可以单击“插入 > 快速部件 > 文档属性 > 版本”之类的内容,它将在文档中包含版本。目标是让人们更轻松地将文档的打印版本与 SharePoint 的版本历史记录关联起来。
我已经能够向文档内容类型添加可编辑文本列,并将它们显示为文档属性快速部分。我还能够添加一个计算列,该列以文本字符串的形式获取版本...但是此计算列没有在 Word 中作为文档属性显示。 (也许我缺少计算列上的设置)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
这是在文档中获取版本的一种方法,让它工作有点痛苦...
在“标签格式”字段中,按以下格式输入元数据字段:
<前><代码> 版本:{版本} \n
设置标签外观并单击预览。
This is one way to get the version in your document, it's a bit painful to get it working...
In the Label Format field, enter the metadata fields in the following format:
Set the label appearance and click on preview.
这需要配置 SharePoint 和 Word 文档。
配置 SHAREPOINT 的文档库:
{Version}
。配置您的 WORD 文档:
这些说明基于埃尔文的回答。
This requires configuring both SharePoint and your Word document.
TO CONFIGURE SHAREPOINT'S DOCUMENT LIBRARY:
{Version}
into the "Label format" box.TO CONFIGURE YOUR WORD DOCUMENT:
These instructions were based on Erwin's answer.
我按照雷切尔的指示进行,效果很好。但是,如果您想要进行电子签名,在文档中捕获此版本更新确实会产生问题。例如,如果您的版本是 1.6 并且您决定这是供人们签名的版本;您会发现,当他们签名时,文档将保存为版本 1.7。当您再次打开文档时,1.7 版本将与授权的 1.6 版本不匹配,并且您将被告知所有签名均无效。
I followed Rachel's instructions and they worked great. However, capturing this version update in the document does create a problem if you want to do electronic signatures. For instance, if your version is 1.6 and you decide this is the one for people to sign; you'll find that when they sign it, the document will be saved as version 1.7. When you open the document again, the version 1.7 will not match the authorized version of 1.6 and you'll be informed that all the signatures are invalid.
重要的:
在 SP2010 中,当在信息管理策略设置下的文档库中启用标签时,无法另存为网站模板。文档库将被损坏,即使我们禁用该策略,另存为站点模板功能仍然会被破坏。唯一的选择似乎是永久删除并重建列表。
IMPORTANT:
In SP2010 you cannot save as a site template when Labels are enabled within a document library under Information management policy settings. The document library will get corrupted and even if we disable the policy, the save as site template function is still broken. The only option seems to be to permanently delete and rebuild the list.
我认为 jaloplo 所指的 RevNum 字段与 SharePoint 文档版本号不同。每次保存文档时它都会更新,但似乎保留自己的修订编号系统,与 SharePoint 版本编号系统相关(但独立)。
The RevNum field that I think jaloplo is referring to is not the same as the SharePoint document version number. It updates every time you save the document, but seems to keep its own revision numbering system, correlated to (but independent of) the SharePoint version numbering system.
尝试在自定义内容类型中创建计算字段。该字段可以等于版本。这将使您能够将其添加为文档中的属性。这只适用于 Office 2007 文档。
创建自定义内容类型后,您可以根据该内容类型创建新文档。
创建文档后,您可以提取文档信息面板并保存。它是一个信息路径表单,因此您可以根据需要对其进行自定义,并将自定义面板上传到内容类型。
Try creating a calculated field in a custom content type. The field can be equal to the Version. That will give you the ability to add it as a property in the document. This only works well with Office 2007 docs.
Once a custom content type is created, you create a new document based on the content type.
After creating the document, you can extract the document information panel and save it. It is an info path form, so you can customise it if necessary and upload the customised panel to the content type.
埃尔文的回答是正确的,但我想留下这个,以防有人遇到与我相同的问题。如果您尝试在网站集内容类型而不是文档库级别设置版本标签,您将收到错误“无法找到标签引用版本”。预览或保存信息策略时。此外,如果您之前已在网站集内容类型级别定义了策略,则您将无法在文档库级别保存策略。它必须在网站集内容类型上设置为“无”。也许从一开始对我来说就应该是显而易见的,但事实并非如此,也许这会帮助其他人。
Erwin's answer is spot on, but I wanted to leave this in case someone runs into the same issue I did. If you attempt to set the label for version on the site collection content type rather than at the document library level, you will get the error "The label reference, Version, could not be found." when previewing or saving the Information Policy. Also, you will be unable to save a policy at the document library level if you have previously defined one at the site collection content type level. It must be set to "None" on the site collection content type. Probably should have been obvious to me from the start, but it wasn't, and maybe this will help someone else down the line.
文档库的所有列都是 Word 文档的文档属性。要获取文档的版本,您必须显示文档属性,然后选择“高级属性”。此时,您将看到经典的文档属性窗口,并且您可以在最后一个选项卡中看到“版本”属性。
因此,您可以将此属性的值添加到文档中所需的位置,例如页脚。
All columns of a document library are document properties for a word document. To take the version of the document you have to show document properties and then select "advanced properties". In thit moment, you'll see the classic document properties window and you can see the "Version" property in the last tab.
So, you can add the value of this property to your document in the place you want, for example, the footer.