Word Host Controls
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.
For more information, see Features Available by Application and Project Type.
Visual Studio Tools for Office provides controls, named host controls, that extend the functionality of some important objects in Microsoft Office Word so that they expose events and can be bound to data. In document-level projects, you can add any host control to your document at design time, or you can add content controls and bookmark controls at run time. Starting in Visual Studio 2008 Service Pack 1 (SP1), you can add content controls and bookmark controls to any open document at run time in application-level add-ins for Word 2007.
In This Section
Describes the extended functionality of content controls, including the different types of content controls and the addition of events and data binding. Also describes how to use content controls to prevent users from editing or deleting sections of documents.
How to: Add Content Controls to Word Documents
Demonstrates how to add content controls to a document at design time and programmatically at run time.
How to: Resize Bookmark Controls
Demonstrates the various ways to resize Bookmark controls, including adding text to the bookmark, recreating the bookmark, and setting the start and end properties in the Properties window.
Walkthrough: Creating a Template By Using Content Controls
Demonstrates how to use all the available content controls to create two interactive tables that users can add to documents.
Walkthrough: Binding Content Controls to Custom XML Parts
Demonstrates how to bind several different types of content controls to data that is stored in custom XML parts in the document.
Walkthrough: Creating Shortcut Menus for Bookmarks
Demonstrates how to write code in the BeforeRightClick event handler of a Bookmark control to display a shortcut menu when the user right-clicks text within a bookmark.
Host Items and Host Controls Overview
Describes the relationship between host items and host controls, and the additional functionality that has been added to the native Office objects upon which they are based.
Excel Host Controls
Provides links to information about the host controls available in document-level projects for Microsoft Office Excel.
Binding Data to Controls in Office Solutions
Lists topics that show how to bind controls, including host controls, to data.
Added information about using host controls in application-level add-ins.
SP1 feature change.