

You can initialize content controls at design time by using the Properties window in Visual Studio. Populate the combo box and drop-down list programmatically In the Controls group, click the Rich Text button to add a RichTextContentControl to the last cell. In the Controls group, click the Drop-Down List button to add a DropDownListContentControl to the second cell.Ĭlick in the last cell of the second column (next to Comments). In the Tables group, click Table, and insert a table with two columns and three rows.Ĭlick in the first cell of the second column (next to Customer Name).Ĭlick in the second cell of the second column (next to Satisfaction Rating). In the Word template, click in the line after the employee table that you added earlier, and press Enter to add a new paragraph. In the Controls group, click the Picture Content Control button to add a PictureContentControl to the last cell.Ĭreate a table that contains three different types of content controls where the user can enter customer feedback information. In the Controls group, click the Combo Box button to add a ComboBoxContentControl to the third cell.Ĭlick the last cell in the second column (next to Picture). In the Controls group, click the Date Picker button to add a DatePickerContentControl to the second cell.Ĭlick the third cell in the second column (next to Title). In the Controls group, click the Text button to add a PlainTextContentControl to the first cell.Ĭlick the second cell in the second column (next to Hire Date).

For more information, see How to: Show the developer tab on the ribbon. If the Developer tab is not visible, you must first show it.

Type text in the first column so that it resembles the following column:Ĭlick in the first cell in the second column (next to Employee Name). In the Tables group, click Table, and insert a table with two columns and four rows. In the Word template that is hosted in the Visual Studio designer, on the Ribbon, click the Insert tab. Visual Studio opens the new Word template in the designer and adds the MyBuildingBlockTemplate project to Solution Explorer.Ĭreate a table that contains four different types of content controls where the user can enter information about an employee. For more information, see How to: Create Office projects in Visual Studio. In the wizard, create a new document in the solution. To create a new Word template projectĬreate a Word template project with the name MyBuildingBlockTemplate. For more information, see Configure a computer to develop Office solutions.Ĭreate a Word template so that users can create their own copies easily. You need the following components to complete this walkthrough:Īn edition of Visual Studio that includes the Microsoft Office developer tools. For more information, see Personalize the IDE. The Visual Studio edition that you have and the settings that you use determine these elements. Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. Preventing users from editing a specified table.Īdding tables to the building block collection of a template.Ĭreating a content control that displays the available building blocks in the template. Populating a combo box content control and a drop-down list content control programmatically. This walkthrough illustrates the following tasks:Ĭreating tables that contain content controls in a Word template at design time. One of the tables contains information about an employee, and the other table contains customer feedback.Īfter you create a document from the template, you can add either of the tables to the document by using several BuildingBlockGaller圜ontentControl objects, which display the available building blocks in the template. Each table contains several content controls that can hold different types of content, such as plain text or dates.
#CONTENT CONTROL IN WORD FOR MAC HOW TO#
This walkthrough shows how to create two tables as building blocks. Word enables you to create a collection of reusable document parts, named building blocks.

For more information, see Features available by Office application and project type. This walkthrough demonstrates how to create a document-level customization that uses content controls to create structured and reusable content in a Microsoft Office Word template.Īpplies to: The information in this topic applies to document-level projects for Word.
