Add buttons and other controls to Office toolbar
in VSTO: Outlook Excel, Word, PowerPoint
You can use any .NET controls on your toolbars
For Excel, Word, PowerPoint 2003, Outlook 2003 and 2007 Add-in Express delivers a great feature that allows using any .NET controls on your toolbars without any coding. You can use buttons, grids, treeviews, lists, edit boxes and any 3rd-party controls on floating or docked toolbars. To do this, just follow the step-by-step instruction below. Please find more details about using .NET controls on Office toolbars on the Microsoft Office Toolbar pages.
Five steps to add .NET controls to your toolbars
1. Add a control adapter to the ADXModule
On the Toolbox, Add-in Express places several special components that support .NET controls on toolbars of the appropriate Office application. There is an Outlook-specific component called ADXOutlookControlAdapter. The Outlook control adapter makes possible to interact between Add-in Express and Microsoft Outlook. So, you add the Outlook control adapter to your ADXModule.
2. Add a toolbar component to the ADXModule
Using the corresponding command of the ADXModule you add a new toolbar component and customize it via the properties window. In this case we use the Add Explorer Command Bar command that creates a toolbar component for the Outlook Explorer window.
3. Add a .NET control to the ADXModule
Then, you can place a .NET control on the ADXModule. For example, you can place DateTimePicker. Customize your picker via the Properties window.
4. Add an Advanced Control to the Controls collection of the toolbar component
Then, you add an Advanced Control to the Controls collection of the toolbar component.
5. Bind the Advanced ADX Control to the control
Then, you bind the Advanced Control to your .NET control as it's shown on the picture below.
Finally, run your add-in and find your toolbar.
Please see the Toolbar Controls for Microsoft Office pages for more information about using .NET controls on Office toolbars and placing any buttons on Outlook toolbar.