Outlook VB.NET addin code samples
Create plugin for Outlook 2019 - 2003
VB.NET Outlook samples
Here you can find an array of HowTo examples that address the most popular aspects of Outlook add-in development in Visual Studio. They demonstrate the following aspects of Outlook development:
And here are VB.NET examples for other applications of the Microsoft Office suite:
This VB.NET Outlook plugin is described in Add-in Express for Office and .NET tutorial: How to build an Outlook COM add-in. From this example you will learn how to:
How to customize Outlook Ribbon and command bars in a single add-in
VB.NET add-in for Outlook 2019 - 2000 demonstrates how to create custom ribbon tabs
and commandbars in a single add-in with one code base. You can find the full details about this
project in the following article: Customizing Outlook Ribbon and command bars in a single add-in.
How to create custom Outlook forms, ribbons & handle Outlook events (SelectionChange)
This plugin for Outlook 2019, 2016, 2013, 2010 and 2007 demonstrates how to create an advanced Outlook region that
shows the selected mail item’s mail header in the explorer window by using the SelectionChange event.
The sample adds another custom form to the inspector window that displays the current mail item’s folder path.
The display of the forms is controlled by two Outlook ribbons containing toggle buttons. You can find the
detailed description and the accompanying video here:
Developing powerful Outlook add-ins with Visual Studio.
How to add custom menu items to the Outlook Explorer context menu
This VB.NET Outlook addin demonstrates the advanced capabilities of Add-in Express with regard to
customizing Outlook Explorer and Inspector toolbars and menus.
It shows how to populate the context menu of Outlook Explorer with your own menu items.
How to create an Outlook task, appointment, note from email
This sample demonstrates how to create an Outlook task, appointment or note item from an
email and how to build a custom form to display information from Outlook contact cards.
How to add a .NET control to a custom Outlook toolbar
A UserControl is added to a new toolbar to handle the SelectionChange event of Outlook Explorer and
to display some info of the currently selected MailItem. For more information, see a step-by-step project showing how to
extend Outlook toolbar with custom .NET controls.
See also a video that demonstrates how to customize Outlook toolbar.
How to create and delete hidden Outlook items via Extended MAPI
This Visual Basic .NET solution accompanies the
How to get access to hidden
Outlook items via Extended MAPI article on the blog. It demonstrates how to get, create and delete a hidden
item in Outlook and Exchange with MAPI Store Accessor in VB.NET.
How to get access to the MAPIFolder within Outlook Property Page
When dealing with Property or Option pages, you often need to access the add-in module.
Download this Outlook VB.NET example to see how to do it correctly.
How to get an attachment size in OutlookThis code sample shows how to learn the attachment size in Outlook 2000 - 2013 programmatically.
How to convert Exchange-based email address into SMTP email address
Use of Extended MAPI is the only right way to convert an Exchange-based email address into an SMTP email address.
This Outlook plugin developed with Visual Basic .NET shows how to do this.
How to move a custom .NET form embedded into Outlook window from one form region to another
This sample Outlook VB.NET add-in shows how you can change layouts of custom .NET forms embedded into Outlook windows.
The add-in creates a Ribbon tab in Office 2019 - 2007 (or a command bar in Office 2003 - 2000) and allows choosing the layout from a combo box.
The form used in this sample processes the SelectionChange event of Outlook Explorer. Please note, you may need
to change the references for the project to compile.
How to change the size of a custom Outlook form
This sample plugin written in VB.NET demonstrates the form-sizing features available for Advanced Form Regions in
Outlook 2013 - 2000. There are two options depending on the visibility of the splitter (as set by the developer):
if the splitter is visible, the user can change the form size and the developer cannot. To change the Outlook
form size programmatically, the developer sets the Splitter property to None. See how to
Create custom Outlook views and forms with Advanced Regions.
How to identify the instance of the form embedded into an Outlook window
This VB.NET Outlook sample add-in shows several forms marked with a GUID. When you click a ribbon button or command bar button
in an Outlook inspector window, the add-in identifies the currently active form instance and shows its GUID.
Controlling the visibility of a custom form
This Outlook plug-in demonstrates the typical use of forms embedded into Outlook windows:
hiding and showing the form in Explorer and Inspector windows.
How to use several forms in the same Advanced Outlook form region
This VB .NET example demonstrates how to use several forms in the same Advanced Form Region.
Click on a RadioButton on the Controlling form to activate the corresponding ADXOlForm. More
about Advanced Outlook Form and View regions.
How to identify the state and location of an Outlook form
The sample addin shows how to get the state and location of an Outlook form programmatically. In particular it
demonstrates how to detect whether a custom Outlook form belongs to an explorer or inspector window and how
to identify this form, for instance by its caption.
How create advanced view regions for Outlook 2013
This example shows how you can create custom forms and display them in the following Outlook view regions: Explorer pane,
Navigation Pane, To-Do bar, Preview pane, Dock pane, Folder View region and Web View region.
How to work with Outlook objects and events
This Outlook VB.NET example shows how to effectively work with Microsoft Outlook objects and events,
how to let the user select the destination tasks folder for any Task item created using a custom toolbar.
How to handle Outlook's ItemSend event in VB.NET
How to handle the Send button event is one of the most frequent questions asked by Outlook developers.
This examples demonstrates how to hook the ItemSend event (Send button event) in an Outlook email inspector,
how to prevent sending a message, how to add / delete addressees at the moment of sending and how to modify
attachments when an e-mail message is being sent.
How to handle Outlook item's Reply event
VB.NET samples demonstrate how to trace the Explorer.SelectionChange event to handle the Reply event of a
selected Outlook item.
How to handle events of an Outlook mail, task, contact and appointment items
VB.NET code sample explain how to correctly handle events of an Outlook items such as MailItem, TaskItem, ContactItem etc.
How to avoid limitations of Microsoft Outlook ItemAdd event
This VB. NET Outlook plugin shows how to get around the limitations of the Outlook ItemAdd event when dragging
a large number of items.