Automating Word by Using Extended Objects
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
Application-level projects
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.
Host Items
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.
Host Controls
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.
See Also
Concepts
Word Document-Level Customization Development
Host Items and Host Controls Overview
Programmatic Limitations of Host Items and Host Controls
Extending Word Documents and Excel Workbooks in Application-Level Add-ins at Run Time
Other Resources
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Added information about host items and host controls in application-level add-ins. |
SP1 feature change. |