How to: Show External Data in Word Using Content Controls
Published: May 2010
Content Controls in Microsoft Office 2010 enable you to expose external data in the body of a Microsoft Word document in the form of content controls, thus creating a document that the user can interact with seamlessly. It uses the external data columns feature and makes any External Data column in a Microsoft SharePoint Server 2010 document library or list available as a content control in Microsoft Word 2010. The content control also provides picking and resolving capabilities.
The following procedure shows how to create a contract document in Word 2010 to show the Contacts data from the AdventureWorks database.
Contacts document library with a Contact external data column created in How to: Create a SharePoint List with External Data Columns.
Show External Data in Word Using External Content Controls
Create a new document by using the New Document button on the SharePoint ribbon in the Document Library tab. This will open a blank document in Word. The document’s properties including the Customer fields are displayed in the Information Panel.
Switch to the Insert tab. Then, click Quick Parts, and then click Document Property. In the Document Property flyout menu, you should see all of the customer fields, as shown in the following figure.
Drag the Customer, Customer:ContactName and Contact:CompanyName fields into the document. The fields display inside Word 2010 as External Data Content Controls as shown below. The Customer Content Control also displays an External Data Item Picker and Resolver. This allows for picking and resolving functionality automatically.
As you are filling a contract, you can select a customer by using the picker, and have the other customer details populated automatically for you. After you finish editing the contact, save it to the document library.