This documentation is archived and is not being maintained.

Document

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

When you create a Microsoft Office Word 2003 application, Microsoft Visual Studio 2005 Tools for the Microsoft Office System automatically creates a Document host item within the project. You reference the Document host item using ThisDocument.

Understanding Document Host Items

The Document host item is a document that exposes events and acts as a container for host controls and Windows Forms controls. In the same way you add Windows Forms controls to a Windows form, you can add Windows Form controls and host controls to a Document host item.

Microsoft.Office.Tools.Word.Document host items cannot be added programmatically. If you create a document at run-time, it will be of the type Microsoft.Office.Interop.Word.Document, and cannot contain any host controls or Windows Forms controls.

Within a Word Application project, the document is the primary vehicle for user interaction. By combining different sets of controls and writing code, you can bind the controls to data, elicit information from the user and respond to user actions.

Events

See Also

Show: