Resting Anchor

The Anchorage

Personal website of Gregory K. Maxey, Commander USN (Retired)

Content Controls
(A Microsoft Word Help & Tip page by Gregory K. Maxey)

DISCLAIMER/TERMS OF USE

The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.

Click to acces PayPal Verification Service Click to acces PayPal Verification Service

However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.

If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!

Click to donate British Pound Sterling                   Click to donate US dollars                   Click to donate EU euros

This Microsoft Word Help & Microsoft Word Tips page serves to introduce Content Controls and list links to several more specific articles on Content Controls that are available on this website.

Content controls were introduced with the release of Word 2007 and have changed little with the subsequent release of Word 2010. I call them "Word's Diamonds in the Rough" because, despite their enormous potential, Microsoft has failed miserably in resolving long standing bugs and in providing enhancements to functionality to fully realize this potential.

Purpose and general description:

Table 1 below provides a general description of the ten types of content controls available in Word 2013.  Some of these controls are not available or have less capability in earlier versions.

Content Controls
TypeGeneral DescriptionRestrictions
Rich TextA rich text control can contain custom formatted text or other items, such as tables, pictures, or other content controls.Before Word 2013, rich text controls cannot be bound to an XML data node.
Plain TextA plain text content control is limited to plain text in a single or multiple paragraphs. It cannot contain other items, such as tables, pictures, or other content controls.All or nothing formatting. For example, if you italicize one word of a sentence that is in a plain text control, all the text inside the control is italicized.
PictureFills the content control with a single image.Prohibits users from inserting any other Word objects or any text.
Combo BoxContains a drop-down selection of list entries that users can select and text box that user can edit directly.All or nothing formatting. Input limited to a single paragraph of text.
Drop-Down ListA drop-down list displays a drop-down list of list entries that users can select. Unlike a combo box, the drop-down list does not let users enter a custom input.All or nothing formatting.
Date PickerContains a calendar control. Limits text to a single paragraph. Like plain text, limits text to a single paragraph that cannot contain any formatting.
Check BoxA check box provides a UI that represents a binary state: selected or cleared. Available only in Word 2010/2013.Content is displayed in a rich text control when opened in Word 2007.
Building Block GalleryA building block gallery enables users to select from a list of document building blocks to insert into a document. A document building block is a piece of content that has been created to be used multiple times, such as a common cover page, a formatted table, or a header.Cannot be bound to an XML data node.
GroupA group control defines a protected region of a document that users cannot edit or delete. A group control can contain any document items, such as text, tables, graphics, and other content controls. Cannot be bound to an XML data node.
Repeating
Section
Repeating section controls can contain text or other controls and allow you to insert as many sections as needed. Word 2013 only.

Table 1

Site Note IconNote: The Check Box content control is new in Word 2010 and was not available in Word 2007.  For a work around, see my: Content Control Custom Checkboxes and Interactive Toggle Objects.

Features

Content controls provide a way for you to design documents and templates that have these features:

User Interface

Content controls provide a UI that is optimized for both user input and print. When you add a content control to a document, the control is identified by a border, a title tab, and temporary (placeholder) text that provides a simple prompt or detailed instructions to the user. The border and the title tab of the control do not appear in printed versions of the document.

cc 1
cc 2
cc 3
cc 3A
cc 4

User Restrictions

Restricting areas of the document lets you prevent users from changing or deleting the content in that area of the document. There are several ways you can restrict areas of a document by using content controls.

cc 5

Site Note IconBonus Tip: Paired content controls can be used to provide labels and input for a simple form. Apply both locking properties to the label control.

cc 6

Site Note IconNotes:
1. If you create a "group" or "rich text" content control that contains other embedded content controls, the embedded content controls are not automatically restricted. You must use the "Lock Contents" property of each embedded control to prevent users from editing their contents. For more on grouping controls see my: Content Control Grouping and Navigation

2. Locked and grouped content controls create un-editable regions in the document.  Doing so can have undesirable effects.  For example if you have grouped or locked controls in a document along with other fields, then if you want to update the document fields, you can't used CTRL+a (select all) the F9, because "all" can no longer be selected.

cc 7

Data Mapping

The real power of content controls lies in their ability to be mapped (or bound) to a custom XML data store embedded in the Word 2007/2010 OfficeOpenXML format document file. Through this binding:

Site Note IconNote: For more information on mapped content controls see: Repeating Data, Mapped Content Controls and Mayor & Maxey CC/V/B and DP Tools Add-In.

Content Controls vs. Legacy Form Fields

Content controls offer opportunities and several advantages to document designers over legacy form fields. Unfortunately they still have some very significant shortcomings.

Advantages

Disadvantages

cc 8

cc 9

cc 10
cc 11
cc 12

Site Note IconNote:  For more on navigating in documents containing content controls see my: Content Control Grouping and Navigation.

Bugs

Site Note Icon Note: The root source of this bug is the built-in "Cut" command located in the Clipboard group of the Home tab.  If you have code in the ContentControlOnExitEvent, you will see the code is executed each time the mouse is hovered over the Cut command. There are at least two brute force workarounds for this bug.  One is to ensure some other tab (e.g., the "Developer" tab) is the the ribbon active tab whenever you enter a content control.  The other is to replace the built-in Cut command with a custom Cut command.  The code/RibbonXML needed to employ these strategies is too long to post here. A demonstration of the bug (for Word 2007 users) and the workaround is in included in my: Validate Content Control Entries.

Comingling Content Controls and Legacy Form Fields

Most advanced and expert Word users recommend not mixing CCs and FFs in the same document.  I generally support that view, but I won't go so far as to say don't!

In documents with a simple layout they can coexists quite well, and I can think of a few situations where I would consider using one or more CCs and one or more FFs in a single document. However, comingling CCs and FFs in the same document will present anomalies.  If you have a compelling reason to comingle then do so, but first arm yourself with knowledge of the consequences to the document and the document user.

I've prepared a white paper (Word macro-enabled document) that covers this topic in more detail, explains the consequences and some possible methods for overcoming them: Comingling CCs and FFs.      

Addition Resources

The following links provide additional tips on using content controls found on this website:

That's it! I hope you have found this tips page useful and informative.

Share

DISCLAIMER/TERMS OF USE

The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.

Click to acces PayPal Verification Service Click to acces PayPal Verification Service

However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.

If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!

Click to donate British Pound Sterling                   Click to donate US dollars                   Click to donate EU euros

Search my site or the web using Google Search Engine

Google Search Logo