Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Using content controls in Word 2007 and Word 2010, you can create document templates with rich, structured blocks of content.
Word Content Controls can be used in a number of different scenarios depending upon the solution you are trying to achieve. In general, most scenarios can be categorized in one of two ways, or a combination of both: document generation and data and content extraction.
The following table lists the two primary categories of Word Content Controls development usage scenarios, Document Generation Systems and Data and Content Extraction. Select from below to view the characteristics usually associated with each category, and suggested content that illustrates the concepts that related to the categories.
Document Generation Systems
Data and Content Extraction
Document generation systems are used to programmatically generate documents.
Sometimes software systems must automatically generate documents to support various scenarios. The design of the system may include the ability for a subject matter expert to create a template document that drives the generation. The template document must determine specific areas of the document for replacement with automatically-generated content. For example, a placeholder in the document must be replaced with the salutation and name of the addressee of a letter.
In addition, the template document may delineate specific sections of the template to remove from the generated document. For example, a template for a legal document may include all possible legal clauses, but based on the specific circumstances, certain legal clauses are omitted in the generated document.
Data and content extraction solutions are used to collect desired business information from existing documents.
For example, an oil company may receive a large number of reports from field personnel and vendors. They want to extract information from these reports in a standardized way, perhaps to build a consolidated report, or to populate a searchable database. Further, they want to leave the original document alone as much as possible, except to indicate the source of various paragraphs or numbers. As the oil company receives each report, appropriate personnel open the report, select areas of text in the document that are extracted after the document is submitted for processing by the software solution.
This topic provides an introduction to content controls.
In document-level Word projects, you can add content controls to the document in your project at design time or at run time. In application-level Word projects, you can add content controls to any open document at run time.
This visual how-to topic shows you how to create a Word 2007 document template using content controls.
This walkthrough demonstrates how to bind content controls in a document-level customization for Word to XML data that is stored in the document.
Read details about how to create document templates programmatically for Microsoft Office Word 2007, including information about using the new content controls, document building blocks, and XML mapping. Review some of the newest members of the Word 2007 object model.
This visual how-to topic shows you how to map content controls to elements in a custom XML part that is attached to a document by using the Developer tab in the Office Fluent Ribbon and the XMLMapping object.
XML mapping is a feature of Microsoft Office Word 2007 that enables you to create a link between a document and an XML file. This creates true data/view separation between the document formatting and the custom XML data.
Learn how to map content controls that are within custom building blocks to XML that contains data.
This blog post shows the steps to leverage the ability of content controls to bind to custom xml.
One of the most common requests we hear related to word processing documents is the ability to merge multiple documents into a single document. This blog shows you how to leverage altChunks and version 2 of the Open XML SDK to easily create a robust document assembly solution in less than a thirty lines of code.
Data-bound content controls are a powerful and convenient way to separate the semantic business data from the markup of an Open XML document.
An individual content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as dates, lists, or paragraphs of formatted text. The ContentControl object is a member of the ContentControls collection.
A collection of ContentControl objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain content such as dates, lists, or paragraphs of formatted text.
Represents a single CustomXMLPart in a CustomXMLParts collection.
Represents a collection of CustomXMLPart objects.
Represents the XML mapping on a ContentControl object between custom XML and a content control.