Create custom Outlook, Word, Excel task pane,
actions panes, keyboard shortcuts in VSTO - C#, VB .NET

Add-in Express™
for Microsoft® Office and VSTO

Custom task panes

With Add-in Express you can build custom task panes for Outlook 2007 and Outlook 2010. The ADXModule contains the TaskPanes collection that centralizes all task panes of your add-in. Each element of the collection binds a task pane to the ADXModule and adds the task pane to the target Outlook window (Explorer or Inspector) at the add-in startup. To create a custom Outlook task pane you just add a new UserControl (as task panes you can use descendants of UserControl only) to your add-in project, then add a new item to the TaskPanes collection and bind it to the UserControl via the ControlType property (see the picture below).

In a similar way you can create custom task panes for Word 2010 and 2007 and Excel 2010 and 2007. As to Word 2003 and Excel 2003, Add-in Express provides design-time and run-time support for actions panes in document level customizations. See also an example of how to create a custom Excel task pane in NET.

Creating custom Task Pane

Application-level keyboard shortcuts

Another great feature of Add-in Express for VSTO is the possibility to create your custom application-level keyboard shortcuts or override any existing ones in Outlook, Excel, Word, Visio and PowerPoint. For example, on Excel you can handle Ctrl-Shift-F to run your custom advanced search dialog box. Though, nothing prevents you from just overriding the built-in Ctrl-F shortcut to completely replace Excel's Find dialog.

To do this, just enable handling shortcuts through the HandleShortcuts property of the ADXModule, add a KeyboardShortcut component to the ADXModule, set its shortcut text and handle its event.

Tuning up the Keyboard Shortcut component.

Interception of built-in toolbar controls

In addition to application-level keyboard shortcuts, you can intercept any toolbar controls built in Office applications. Teamed up with overriding keyboard shortcuts, the ability to intercept any built-in controls empowers you to completely redefine standard behavior of Office applications. For example, in order to fully redefine the process of writing a document in Word, you can override the Ctrl-S shortcut and intercept the Save button on the Standard toolbar. Just use the BuiltinControl and KeyboardShortcut components available from ADXModule commands.

Shared toolbars and ribbon tabs

With Add-in Express you can share your toolbars and ribbon tabs between your add-ins. For Office 2003 you specify toolbars by their names. So, to share one toolbar between two add-ins just use the same toolbar name. Moreover, you can use the name of any built-in toolbar, e.g. Standard. In this case your controls will be added to the built-in Standard toolbar. As for shared ribbon tabs on Office 2003, it is is a bit more complicated matter. You should specify namespaces for your two add-ins and make the tab shared (the Shared property).

Please note, you can find more information about Add-in Express tips and tricks for VSTO add-in, commandbar and ribbons on the VSTO tips page.