How to add a custom header to your Outlook form or task pane: C# and VB.NET
Usual Add-in Express advanced Outlook region or task pane can have a header – a multi-functional area above the region that allows an end-user to minimize your custom form, close it or switch between forms located in the same region. The look of the standard header is changed automatically depending on the version and color scheme of the Office application. But what if your Outlook forms need custom design or custom implementation of the header? The answer is simple – create your own!
Add-in Express for Office and .net allows turning the standard form’s header off. You can also change the size of your custom Outlook pane or form at run-time, enable /disable the standard splitter and the Hide-region button located on the splitter. The functionality is sufficient to emulate the standard behavior (normal, minimized and hidden states) of the advanced Outlook region or a task pane in Excel, Word or PowerPoint.
How to add a custom header to an Outlook form
In this example we created a custom header for a particular Outlook region – RightSubpane, which is located to the right from the Supergrid, i.e. a list of items in an Outlook folder. This solution works in all versions of Microsoft Outlook: 2010, 2007, 2003 and lower. You can download the C# and VB.NET code examples at the end of the post.
In the meantime, let's see how our form looks in Outlook 2010:
Outlook form with a custom header (Normal state):
Outlook form with a custom header (Minimized state):
Note. If two custom Outlook forms happen to reside in the same region – your form with a custom header and some other form, the standard header will be enabled and will appear above your custom one.
You may also be interested in:
Advanced Outlook view and form regions – Basic concepts
Advanced Outlook view and form region types
Available downloads:
This sample add-in was developed using Add-in Express 2010 for Microsoft Office and .net
C# sample Outlook add-in
VB.NET sample Outlook add-in