This documentation is archived and is not being maintained.

Automating Word by Using Extended Objects

Updated: July 2008

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Document-level projects

  • Word 2003

  • Word 2007

Application-level projects

  • Word 2007

For more information, see Features Available by Application and Project Type.

Visual Studio Tools for Office adds events and data-binding capabilities to some of the objects that are provided by the native object model of Microsoft Office Word (that is, the object model that is exposed by the primary interop assembly for Word). These extended objects are called host items and host controls.

Starting in SP1, host items and host controls are available in application-level add-ins and document-level customizations. Without SP1 installed, they are available only in document-level customizations. For more information, see Host Items and Host Controls Overview.

Word projects give you access to the Document host item.

The Document host item acts as a container for other controls, including host controls and Windows Forms controls, and it maintains information about the controls on its surface.

The Document host item also provides most of the same members as the Document class, which is the corresponding class in the native object model of Word. For more information, see Document Host Item.

There are several host controls for Word that help you create, organize, and automate documents. Most of their functionality involves importing, presenting, and protecting data. These host controls provide events and data-binding capabilities that their counterparts in the native Word object model do not have. For information about host controls and step-by-step procedures for how to use them, see Word Host Controls.




July 2008

Added information about host items and host controls in application-level add-ins.

SP1 feature change.