- Create an empty Word 2007 template.
- Create a new Content Type by “Site Actions > Site Settings > Site Content Types > Create”, select “Document Content types – Document” as parent.
- Add required fields to the new Content Type.
- Upload the Word 2007 template by “Advanced settings > Upload a new document template”.
- Create a new Document Library and enable the content type management by “Settings > Advanced settings > Allow management of content types? > Yes”.
- Add content type created in step 2 to the document library created in step 5.
- Add new document library item by selecting the template created in step 1.
We can also create Word 2007 content controls under developer tab (Ribbon), but there is no direct association between the content controls and document properties if we do so. OpenXML and Word 2007 custom properties techniques are required for Word content automation (SharePoint/Word data binding). I will put more details about this in my next post.
Although SharePoint can generate document properties automatically, not all SharePoint fields are supported by document properties; and not all types of document property are supported by Word content controls. Following table lists mapping of common SharePoint fields and Word 2007 content control:
SharePoint Field Type | Word 2007 Content Control |
Single line of text | Text (Not allow carriage returns) |
Multiple lines of text | Text (Allow carriage returns) |
Choice | Dropdown list |
Number | Text with Schema validation |
Currency | Text with Schema validation |
Date and Time | Date picker |
Yes/No | Dropdown list |
Lookup | N/A |
Person or Group | N/A |
Hyperlink or Picture | N/A |
Calculated | N/A |
Custom filed | N/A |
For those SharePoint fields missing World 2007 equivalent content control, we could create a Word content control compatible field in content type, and manually convert the original SharePoint field to that compatible field and versa vise inside list item event receiver. For example, a Text field can be used to map a custom field which is not recognized by Word 2007.