.comment-link {margin-left:.6em;}

Pranav Wagh's Blog

Tuesday, December 27, 2005

Things to remember while designing a VSTO 2005 project.

Programmatic Limitations of Host Controls

l       For each host item and host control there is an underlying native Word or Excel object which can be accessed via the InnerObject property of the host item or host control.  You cannot however, cast a native object to it’s host item or host control.

l       Host items are not created automatically when you create a new document or worksheet at runtime.  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.

l       Host controls and Windows Forms controls cannot be added to a native Word document or Excel worksheet, they can only be added to a host item.

l       Most methods and properties of host items return the underlying native Office object upon which the item is based

l       VSTO does not provide individual collections for each type of host control.  For example, it is not possible to enumerate each Microsoft.Office.Tools.Word.Bookmark control in the document using the Microsoft.Office.Interop.Word.Bookmarks collection.  You can use the ControlCollection to iterate through all controls (host controls and Windows Forms controls) on the document and then look for items that match the type of host control that you are interested in

l       In Microsoft Word, you can pass a host control to a method or property that requires a native Word object for which there is a corresponding host control.  However, in Excel, you must pass the native Office object rather than the corresponding host control.  You can use the InnerObject property of the host control to pass the native Office object

l       If a user deletes or cuts a control from the document at run time, the control cannot be restored by using the Undo or Paste methods.  The Undo and Paste operations will add the underlying native Office object back to the document, but the object is no longer a host control.


Managed Windows Forms Controls

l       Controls can be added either manually or programmatically

l       Controls can be added to a Windows form, the actions pane, or directly on the document.

l       Windows Forms controls are not supported inside of a header or footer, or within a subdocument.


The following controls and components are not available in the Toolbox and are not supported for use on documents in VSTO 2005:

l       BindingNavigator

l       ContextMenuStrip

l       CrystalReportViewer

l       DataGrid

l       DirectoryEntry

l       DirectorySearcher

l       ErrorProvider

l       EventLog

l       FileSystemWatcher

l       FlowLayoutPanel

l       GroupBox

l       MainMenu

l       MenuStrip

l       MessageQueue

l       NotifyIcon

l       PageSetupDialog

l       Panel

l       PerformanceCounter

l       PrintDialog

l       PrintDocument

l       PrintPreviewControl

l       Process

l       RichTextBox

l       SerialPort

l       ServiceController

l       SplitContainer

l       Splitter

l       StatusBar

l       StatusStrip

l       TabControl

l       TableLayoutPanel

l       System.Timers.Timer

l       System.Windows.Forms.Timer

l       ToolBar

l       ToolStrip

l       ToolStripContainer

l       ToolStripDropDown

l       ToolStripDropDownMenu

l       ToolStripPanel



Unsupported methods and properties of Word controls

l       Hide

l       Show

l       Anchor

l       Dock

l       Location

l       TabIndex

l       TabStop

l       TopLevelControl

l       Visible


Unsupported methods and properties of Excel controls

l       Anchor

l       Dock

l       Location

l       TabIndex

l       TabStop

l       TopLevelControl







  • Get any Desired College Degree, In less then 2 weeks.

    Call this number now 24 hours a day 7 days a week (413) 208-3069

    Get these Degrees NOW!!!

    "BA", "BSc", "MA", "MSc", "MBA", "PHD",

    Get everything within 2 weeks.
    100% verifiable, this is a real deal

    Act now you owe it to your future.

    (413) 208-3069 call now 24 hours a day, 7 days a week.

    By Blogger osjv8zy54nj, at 5:22 PM  

Post a Comment

Links to this post:

Create a Link

<< Home