Create Office add-in in VB .NET - HOWTO for MS Outlook, Excel, PowerPoint, Project and Frontpage

Visual Basic .NET HOWTOs

  1. How to create Microsoft Office add-in
  2. How to develop Microsoft Outlook add-in in VB.NET
  3. How to build your first RTD server in VB.NET
  4. How to develop Excel Automation add-in
  5. How to program your first smart tag
  6. How to create an add-on for Internet Explorer in Visual Studio 2005
  7. How to add a .NET control to a custom Outlook toolbar
  8. How to add a .NET control to a custom Excel toolbar
  9. How to move a custom .NET form embedded into Outlook window from one form region to another
  10. How to cache forms embedded into Outlook Explorer windows
  11. How to change the size of a form embedded into an Outlook window
  12. How do you identify the instance of the form embedded into an Outlook window?
  13. Controlling the visibility of a form in an Advanced Form Region
  14. Events of Reading Pane, Navigation Pane, and To-Do bar
  15. Several forms in the same Advanced Form Region
  16. How to handle the ItemSend event of MS Outlook in VB.NET
  17. How to scan Outlook folders in VB.NET
  18. How to handle Outlook's SelectionChange event in VB .NET
  19. How to get access to the MAPIFolder within Outlook Property Page
  20. How to handle the ExplorerClose event (Outlook) in Visual Basic
  21. How to add custom menu items to the popup menu in Outlook Explorer
  22. How to create a command bar and command bar controls at run time (for Outlook)
  23. How to handle the FrontPage OnWindowActivate event in VB .NET
  24. How to handle the TaskChange event of MS Project in Visual Basic
  25. How to handle the WorkbookBeforeSave event of MS Excel in VB.NET
  26. How to handle the MouseClick event on presentation's objects (PowerPoint)
  27. How to change the CommandBarComboBox (TadxCommandBarComboBox) properties at run time
  28. How to create and delete hidden Outlook items via Extended MAPI

1.  How to create Microsoft Office add-in

This Visual Basic .NET solution for VS 2005 is described in Add-in Express documentation (see Creating your first Office add-in). It demonstrates the following features of Add-in Express 2007 for .NET:

  • A single add-in supporting all versions of several Office applications (Excel and Word)
  • Command bars and command bar controls
  • Office 2007 Ribbon controls in Ribbon tabs and Office menu
  • Office 2007 task panes
  • Application-level event handling
  • An event class for handling worksheet events
  • The use of version-neutral Office interops
  • The setup project generated automatically
  • Ready-to-use custom actions in the setup project

Find the complete list of features on Developing Office add-ins page. See also Add-in Express video showing how to build Office add-in.

Available downloads:
Sample add-in for VS 2005   Sample add-in for Excel 2003 (VSTO 2005 SE)

 


2.  How to develop Microsoft Outlook add-in in VB.NET

This Outlook VB.NET solution for VS 2005 is described in Add-in Express 2007 for .NET documentation (see Your first Outlook add-in). From this example you can learn how to:

  • Develop an add-in that supports all Outlook versions: from Outlook 2000 to Outlook 2007.
  • Build Outlook-specific command bars and command bar controls.
  • Create Office 2007 Ribbon controls in Ribbon tabs and Office menu.
  • Create and control Office 2007 task panes.
  • Add custom property pages to the Tools | Options and Folder Properties dialogs.
  • Handle application-level events.
  • Handle events of the Items collection (add, remove, or change Outlook Items).
  • Handle keyboard shortcuts.
  • Use version-neutral Office interop assemblies.
  • Enable ready-to-use custom actions in setup projects.

Find the complete list of features on the Developing Outlook plug-in page. See also Add-in Express video about how to create Outlook 2007 plug-in.

Available downloads:
Sample add-in for VS 2005   Sample add-in for Outlook 2003 (VSTO 2005 SE)

 


3.  How to build your first RTD server in VB.NET

See how to build an Excel RTD server step-by-step in the Add-in Express Developer's Guide. The sample RTD server project is written in Visual Basic .NET (VS 2005). See also Add-in Express video showing how to create an RTD server.

Download ZIP file

 


4.  How to develop Excel Automation add-in

See how to create Excel Automation add-ins step-by-step in the Add-in Express Developer's Guide. The sample Excel Automation add-in is written in VB.NET (VS 2005).

Download ZIP file

 


5.  How to program your first smart tag

Find how to program smart tags step-by-step in Add-in Express documentation. The sample smart tag is written in Visual Basic .NET (VS 2005). See also Add-in Express flash video about building smart tags for Excel and Word.

Download ZIP file

 


6.  How to create an add-on for Internet Explorer in Visual Studio 2005

This Visual Basic .NET solution for VS 2005 is used in Add-in Express for Internet Explorer flash videos. It demonstrates how you can use Add-in Express .NET for IE in order to create a custom IE toolber, custom Internet Explorer Bar, custom IE menu item / command, custom context menu item etc.

Download ZIP file

 


7.  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. This Outlook VB.NET example is written for Visual Studio 2005 and 2008. See a step-by-step sample project showing  how to enhance Outlook toolbar with custom .NET controls. See also a flash video showing how to customize Outlook 2003 toolbar.

Download ZIP file

 


8.  How to add a .NET control to a custom Excel toolbar

A UserControl is added to a new toolbar to handle a number of Excel events. The UserControl shows the current state of AutoFilter settings and allows changing them. This sample Excel VB.NET project is for Visual Studio 2005. Read more about customizing Excel toolbar with any visual .NET controls. See also Add-in Express video about how to add custom controls to Excel toolbar.

Download ZIP file

 


9.  How to move a custom .NET form embedded into Outlook window from one form region to another

This sample VB.NET add-in for Visual Studio 2005 shows how you can change layouts of custom .NET forms embedded into Outlook windows. The add-in creates a command bar (a Ribbon tab in Office 2007) and allows choosing the layout from a combo box.

The form used in this sample processes the SelectionChange event of Outlook Explorer. The sample includes the source code and the setup project. Please note, you may need to change the references in order for the project to compile.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


10.  How to cache forms embedded into Outlook Explorer windows

This VB.NET sample for Visual Studio 2005 demonstrates the Advanced Outlook Form Region caching functionality available for forms embedded into Outlook Explorer windows. The developer can use this functionality to preserve form data when the user switches between folders.

There are three caching options for such forms: Non-cached, NewInstanceForEachFolder, and OneInstanceForAllFolders.

Forms embedded into Outlook Inspector windows are always non-cached. More about customizing Outlook Explorer views.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


11.  How to change the size of a form embedded into an Outlook window

This sample written in VB.NET demonstrates the form-sizing features available for Advanced Form Regions in Outlook 2000 -2007.

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 form size programmatically, the developer sets the Splitter property to None.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


12.  How do you identify the instance of the form embedded into an Outlook window?

This VB.NET sample shows several forms marked with a GUID. When you click a command bar button (a Ribbon button in an Outlook 2007 inspector), the add-in identifies the currently active form instance and shows its GUID.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


13.  Controlling the visibility of a form in an Advanced Form Region

This sample for Visual Studio 2005 demonstrates the typical use of forms embedded into Outlook windows: hiding and showing the form in Explorer and Inspector windows.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


14.  Events of Reading Pane, Navigation Pane, and To-Do bar

This sample add-in for Visual Studio 2005 demonstrates how you can make use of events missing in Outlook:

  • Show / hide Navigation Pane (FolderList, Outlook Bar)
  • Show / hide / move Reading Pane (Preview Pane)
  • Show / hide / minimize To-Do Bar

Find more about special features for customizing Reading and Navigation panes, Outlook bar and To-Do bar.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


15.  Several forms in the same Advanced Form Region

This sample add-in in VB.NET 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.

Available downloads:
Sample add-in for VS 2005   Sample add-in for VSTO 2005   Sample add-in for VSTO 2005 SE

 


16.  How to handle the ItemSend event of MS Outlook in VB.NET

Download ZIP file

 


17.  How to scan Outlook folders in VB.NET

Download ZIP file

 


18.  How to handle Outlook's SelectionChange event in VB .NET

Download ZIP file

 


19.  How to get access to the MAPIFolder within Outlook Property Page

Download ZIP file

 


20.  How to handle the ExplorerClose event (Outlook) in Visual Basic

Download ZIP file

 


21.  How to add custom menu items to the popup menu in Outlook Explorer

Download ZIP file

 


22.  How to create a command bar and command bar controls at run time (for Outlook)

Download ZIP file

 


23.  How to handle the FrontPage OnWindowActivate event in VB .NET

Download ZIP file

 


24.  How to handle the TaskChange event of MS Project in Visual Basic

Download ZIP file

 


25.  How to handle the WorkbookBeforeSave event of MS Excel in VB.NET

Download ZIP file

 


26.  How to handle the MouseClick event on presentation's objects (PowerPoint)

Download ZIP file

 


27.  How to change the CommandBarComboBox (TadxCommandBarComboBox) properties at run time

Download ZIP file

 


28.  How to create and delete hidden Outlook items via Extended MAPI

This sample Visual Basic .NET solution for VS 2005 accompanies the How to get access to hidden Outlook items via Extended MAPI article on the blog. It demostrates how to get, create and delete a hidden item in Outlook and Exchange with MAPI Store Accessor in VB.NET.

Download ZIP file

 




Client login

 

Login 

Password 

 

Remember me

Forgot my password