Programmatically Creating Host Items and Host Controls
Host items are not created automatically when you programmatically create a new document or worksheet at run time. For example, if you add a Word document at run time, it will be of the type Microsoft.Office.Interop.Word.Document rather than Microsoft.Office.Tools.Word.Document. Similarly, when you add a worksheet programmatically at run time using the Add method, you get a worksheet of the type Microsoft.Office.Interop.Excel.Worksheet not Microsoft.Office.Tools.Excel.Worksheet. Host controls can be created programmatically, but they can only be added to host items. If you programmatically create a document or worksheet, the item is not a host item, and you will not be able to add host controls to the programmatically created document or worksheet. You can create host items only at design time.
You can programmatically add host controls to a host item by using one of the Add<Control> methods. For example, to add a NamedRange control to your document, use the AddNamedRange method. Only the following host controls can be created programmatically
Partager