Use Host Controls to extend the Excel and Word object modelYou can now take advantage of new controls, called host controls, which extend some of the built-in Word and Excel objects of Office. Host controls that are added to Office documents behave like the native Office objects such as ranges, but with additional functionality, including events and data-binding capabilities. Host controls available in Word projects are Bookmark, XMLNode, and XMLNodes. Host controls available in Excel projects are NamedRange, XMLMappedRange, ListObject, and Chart. You can add host controls to your document from within Visual Studio, or through the Office user interface. Managed control hosting within Word and Excel documents reduces the differences between Office solution development and Windows solution development. Elements such as cells, ranges, lists, and bookmarks become first-class controls that are easily accessible in code. Each host control is uniquely identified, enables data binding, and provides a more complete event model. You can add host controls to your Word documents or Excel worksheets in one of four ways:
|