views:

686

answers:

2

Hi,

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.

All solutions are realy appreciated!!!

Thanks,

A: 

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.

Nat
+1  A: 

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

Brian Meinertz