

The easiest way to create a content control is through the user interface (although you can also create them programmatically). When the prices change, an add-in can programmatically update the attached XML file, which is bound to each plain text content control, and the new, updated prices automatically appear in the table. For example, if you insert plain text content controls into cells of a table of stock prices, you can map the content controls in the table cells to nodes in an XML file that contain the current stock prices. Map the contents of a content control to data in a custom XML part. This makes templates more robust than in previous versions. Or, as another example, you can also lock a content control that you have placed within a template document so that a user does not accidentally delete the content contained in the content control. This is useful if, for example, you have copyright information in a template that the user should be able to read but not edit. Each content control can be restricted, so that it cannot be deleted or edited. Restrict the ability to modify content controls within a document. In this way, you can build a template with predefined block types. Similarly, if you want a section of a template to display an image, create a picture content control in that area. For example, if you want a region of your template to be a calendar, you insert a calendar content control in that area of the document, which automatically determines what that block of content does. Each content control takes up a portion of a document and, as the template author, you can specify what each region does. Examples of types of structured regions (or content controls) are combo boxes, pictures, text blocks, and calendars.ĭetermine the behavior of content controls.


Each structured region has its own unique ID so that you can read from and write to it. Specify structured regions in a template. Content controls enable you to author templates that insert well-defined blocks into your documents. However, they are much more powerful, flexible, and useful because they enable you to create rich, structured blocks of content. In some cases, content controls might remind you of forms. Individual content controls can contain content such as dates, lists, or paragraphs of formatted text. Feedback In this article What Are Content Controls?Ĭontent controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content.
