简体   繁体   中英

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?

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')

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.

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.

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

Word Content Control Toolkit (Codeplex)

Video Demo: Merging SharePoint List Data into Word Documents

Linking Word 2007 Content Controls to Custom 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. 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.

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."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM