[英]How to automatically create Word documents which include list fields from a custom SharePoint list?
Is it possible to automatically create Word documents which include list fields from a custom SharePoint list? 是否可以自动创建包含自定义SharePoint列表中的列表字段的Word文档?
here is the scenario: - custom list (over 100 columns) - Word templates (not sure where is best to store them yet) - Entry Form will provide data for the templates (or partial data, ie Client name, Sales Rep) - a form that will have buttons (ie 'Create Order Form', 'Create PO') 这里是场景: - 自定义列表(超过100列) - Word模板(不确定哪里最好存储它们) - Entry Form将提供模板(或部分数据,即客户名称,销售代表)的数据 - a将有按钮的表单(即'创建订单表','创建订单')
the idea is to be able to generate partial populated templates from a custom list with a puch of a button. 我们的想法是能够通过一个按钮从自定义列表中生成部分填充的模板。
You should look into the Word Control Toolkit, which uses the Open XML format SDK to achieve what you require. 您应该查看Word Control Toolkit,它使用Open XML格式SDK来实现您的需求。
The basic functionality is that you use the Edit Control Block on a selected list item to generate and populate a Word document using a template you can select from a drop-down list. 基本功能是使用所选列表项上的“编辑控制块”,使用可从下拉列表中选择的模板生成和填充Word文档。
I've used it successfully to create printable invoices based on a contracts list. 我已经成功地使用它来创建基于合同列表的可打印发票。
Here's some links to get you started: 这里有一些链接可以帮助您入门:
Generating Documents from SharePoint Lists with Open XML Content Controls 使用Open XML内容控件从SharePoint列表生成文档
Word Content Control Toolkit (Codeplex) Word内容控制工具包(Codeplex)
Video Demo: Merging SharePoint List Data into Word Documents 视频演示:将SharePoint列表数据合并到Word文档中
Linking Word 2007 Content Controls to Custom XML 将Word 2007内容控件链接到自定义XML
If you create a document library with custom fields (or better yet a content type), Office 2007 documents will include the fields as properties of the document. 如果使用自定义字段(或更好的内容类型)创建文档库,Office 2007文档将包含字段作为文档的属性。 Word inludes features to add those fields to the document (Insert->QuickParts-Document Property). Word包含要将这些字段添加到文档的功能(Insert-> QuickParts-Document Property)。
You can automate the placement of items on the document by adding a document template to your content type. 您可以通过向内容类型添加文档模板来自动放置文档中的项目。
I know your post is old but if you are still available, can your proposition be more detailed: 我知道你的帖子已经过时但是如果你仍然有空,你的建议可以更详细一些:
"If you create a document library with custom fields (or better yet a content type), Office 2007 documents will include the fields as properties of the document. Word inludes features to add those fields to the document (Insert->QuickParts-Document Property). You can automate the placement of items on the document by adding a document template to your content type." “如果使用自定义字段(或更好的内容类型)创建文档库,Office 2007文档将包含字段作为文档的属性.Word包含将这些字段添加到文档的功能(Insert-> QuickParts-Document Property通过在内容类型中添加文档模板,您可以自动在文档上放置项目。“
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.