Delphi - Outlook, Excel, PowerPoint add-in / plug-in samples
for Delphi 5, 6, 7, 2005 - 2010

Delphi HowTo examples

Note. The most recent HowTo samples are published on Add-in Express blog. Be sure to check it out, we add new HowTo examples every week.

Outlook general

How to create your first Microsoft Outlook add-in in Delphi

You can find this Delphi project in the Add-in Express online Developer's Guide (see Creating your first Outlook plug-in in Delphi). It demonstrates the following features of Add-in Express for Office and VCL:

  • Adding a property page to the Properties dialog box of the Outlook Inbox folder
  • Adding an Outlook 2007 task pane to Outlook Explorer and Inspector windows
  • Handling Microsoft Outlook events
  • Accessing the Outlook Object Model methods and properties

See the complete list of Add-in Express for VCL features that speed up the development of Outlook COM add-ins, such as Advanced Outlook View and Form Regions, Outlook context-sensitivity, integrated Outlook-specific events, Navigation pane shortcuts and more.
Available downloads:Sample Outlook add-in for Delphi 5 - 2010

How to scan Outlook folders using Delphi

This Delphi example shows how you can scan folders in Outlook 2000, XP, 2003 and 2007 to get their tree view.
Available downloads:Sample add-in for Delphi 5 - 2010

How to add custom menu items to the popup menu in Explorer

This Delphi Outlook example shows how to add custom menu items to the Outlook Explorer context menu.
Available downloads:Sample add-in for Delphi 5 - 2010

How to create a command bar and command bar controls at run time in Outlook

This Win32 sample shows how to add a new control (button) to your Outlook toolbar.
Available downloads:Sample add-in for Delphi 5 - 2010

How to modify the CommandBarComboBox (ADXCommandBarComboBox) properties at run time

If you need to change the ADXCommandBarComboBox properties at run-time, download this Delphi sample.
Available downloads:Sample for Delphi 5 - 2010

Ho to add a new item to the Outlook context menu

This Win32 sample shows how you can add several items to an Outlook context menu and connects to their Click events via IConnectionPoint.
Available downloads:Sample for Delphi 5 - 2010

How to add a property page to the Tools | Option menu in Outlook

This Delphi example for Outlook demonstrates how to add a property page to the Outlook Tools | Options... dialog box.
Available downloads:Sample for Delphi 5 - 2010

How to save and restore the position of a temporary Outlook command bar in Delphi

Sample add-in for Delphi 5 - 2010

How to handle the BeforeCheckNames event of the Outlook MailItem interface

Sample add-in for Delphi 5 - 2010

How to create an Outlook Bar shortcut in Delphi?

Sample add-in for Delphi 5 - 2010

How to get access to MAPIFolder within Outlook Property Page

This Delphi example shows how to access MAPIFolder when dealing with Outlook Property or Option pages.
Available downloads:Sample add-in for Delphi 5 - 2010

Advanced Outlook Regions

How to move a custom VCL form embedded into Outlook window from one form region to another

This sample Delphi Outlook add-in shows how you can change a layout of your custom VCL form embedded into Outlook windows. The add-in creates a commandbar (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. Source code included.
Available downloads:Sample add-in for Delphi 5 - 2010

How to cache forms embedded into Outlook Explorer windows

This Delphi sample demonstrates the Advanced Form Region caching functionality available for forms embedded into Outlook Explorer windows. The developer can use this functionality to create the form which will preserve its 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.
Available downloads:Sample add-in for Delphi 5 - 2010

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

This Delphi add-in 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 can not. To change the form size programmatically, the developer sets the Splitter.Visible property to false.
Available downloads:Sample add-in for Delphi 5 - 2010

How to identify the form in an Advanced Form region

This Delphi example shows how to identify the instance of the form embedded into an Outlook window. You have several forms marked with a GUID. When you click a toolbar 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 Delphi 5 - 2010

How to control the visibility of a form in an advanced form region

This Delphi sample add-in 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 Delphi 5 - 2010

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

This sample project for Delphi demonstrates the 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

More about customization of Outlook Navigation pane, Reading pane, To-Do bar.
Available downloads:Sample add-in for Delphi 5 - 2010

How to use several forms in the same Advanced Outlook Form Region

This add-in demonstrates how to use several custom forms embedded into the same advanced Outlook form region. Click on a RadioButton on the Controlling form to activate the corresponding ADXOlForm. More about Advanced Outlook Form Regions.
Available downloads:Sample add-in for Delphi 5 - 2010

How to switch between the standard Outlook explorer view and WebViewPane view

This sample Outlook add-in shows how you can switch between the standard Outlook explorer view and the WebViewPane view.
Available downloads:Sample add-in for Delphi 5 - 2010

How to create an advanced region in Outlook 2000, 2002, 2003, 2007?

Sample add-in for Delphi 5 - 2010

Outlook events

How to handle the ItemSend event of Microsoft Outlook

This Delphi Outlook sample demonstrates how to handle the ItemSend event.
Available downloads:Sample add-in for Delphi 5 - 2010

How to handle the SelectionChange event in Delphi 

You can find this example useful if you are doing your first steps in Outlook development.
Available downloads:Sample add-in for Delphi 5 - 2010

How to handle the Outlook ExplorerClose event

Yet another example of handling Outlook events
Available downloads:Sample add-in for Delphi 5 - 2010

How to connect to FolderAdd, FolderChange, and FolderRemove events in Outlook?

Sample add-in for Delphi 5 - 2010

How to connect to ItemAdd, ItemChange, and ItemRemove events in Outlook?

Sample add-in for Delphi 5 - 2010

Excel general

How to create your first Excel RTD server

See how to build an Excel Real-Time Data server step-by-step in the online Add-in Express Developer's Guide (Building Excel RTD server). The sample RTD server project is written in Delphi.
Available downloads:Sample  for Delphi 5 - 2010

How to handle the WorkbookBeforeSave event of MS Excel in Delphi

Sample for Delphi 5 - 2010

How to create an Excel command bar and command bar controls at run time in Delphi

Sample for Delphi 5 - 2010

How to pass a parameter to an RTD function in Delphi

Sample for Delphi 5 - 2010

How to work with a command bar button at run-time in Delphi

Sample for Delphi 5 - 2010

How to use the TTable component as a data source for RTD servers

This Delphi example shows how to use the TTable component as a data source for Excel real-time data servers.
Available downloads:Sample for Delphi 5 - 2010

Excel Automation add-ins and user-defined functions

How to write your first Excel Automation add-in

This sample Excel Automation add-in in Delphi is described in the online Add-in Express documentation (see Excel Automation add-ins).
Available downloads:Sample add-in for Delphi 5 - 2010

How to create a custom Excel UDF in Delphi

This sample Excel Automation add-in in Delphi shows how to create user-defined functions.
Available downloads:Sample add-in for Delphi 5 - 2010

Advanced Excel Task Panes

How to re-size an Excel task pane

This add-in illustrates the form-sizing features available for Advanced Task Panes for Excel 2000 - 2007. There are two options depending on the visibility of the splitter: 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.Visible property to false.
Available downloads:Sample add-in for Delphi 5 - 2010

How to build a context-dependent Advanced Excel Task Pane

The Delphi sample for Excel dynamically shows / hides an Advanced Excel Task Pane when cell A1 contains some value or doesn't contain any.
Available downloads:Sample add-in for Delphi 5 - 2010

How to use several Advanced Excel Task Panes in one position

This Delphi example shows how you can use several Excel task panes in one position. Click on a RadioButton on the Controlling Task Pane to activate the necessary TadxExcelTaskPane. Find more about Advanced Excel task panes.
Available downloads:Sample add-in for Delphi 5 - 2010

How to set the visibility of Advanced Excel Task Pane

This Excel sample for Delphi demonstrates how to prevent TadxExcelTaskPane from being shown and how to show it from a command bar.
Available downloads:Sample add-in for Delphi 5 - 2010

How to create a custom pane in Excel 2000, 2002, 2003, 2007?

This Excel sample for Delphi demonstrates how to prevent TadxExcelTaskPane from being shown and how to show it from the command bar.
Available downloads:Sample add-in for Delphi 5 - 2010

FrontPage

How to handle the FrontPage OnWindowActivate event in Delphi

This sample shows how to handle the FrontPage OnWindowActivate event in Delphi.
Available downloads:Sample add-in for Delphi 5 - 2010

Project

How to handle the TaskChange event of MS Project

This sample demonstrates how to handle the TaskChange event of MS Project in Delphi.
Available downloads:Sample add-in for Delphi 5 - 2010

Microsoft Office general

How to develop your first add-in for Microsoft Office

You can find this Delphi project in the Add-in Express online Developer's Guide (see Creating your first Office add-in in Delphi). From this example you will learn about the following features of Add-in Express for VCL:

  • Version neutral COM add-ins that support all versions of several Office applications
  • Toolbars and toolbar controls
  • Office 2007 Ribbon controls in Ribbon tabs and Office menu
  • Office 2007 task panes
  • Handling application-level events

Find the complete list of Add-in Express VCL features which you will certainly find useful when developing Office plug-ins.
Available downloads:Sample add-in for Delphi 5 - 2010

How to develop your first smart tag in Delphi

Find how to program smart tags in Delphi in the online Add-in Express documentation. See also Add-in Express VCL smart tag flash video.
Available downloads:Sample add-in for Delphi 5 - 2010

How to implement a custom recognizer for a Smart Tag?

Sample add-in for Delphi 5 - 2010

How to create a custom Office toolbar in Delphi

This Delphi sample shows how to develop a custom Excel command bar and a command button.
Sample add-in for Delphi 5 - 2010

How to intercept keyboard combinations pressed by the user?

This sample add-in for Outlook intercepts Alt+W, Alt+R, Alt+L shortcuts.
Available downloads:Sample add-in for Delphi 5 - 2010

How to use Add-in Express 2 with projects based on Add-in Express 1.x

This Delphi sample shows how to use Add-in Express with projects based on Add-in Express 1.x.
Available downloads:Sample add-in for Delphi 5 - 2010

How to use MSForms components in my add-in?

Available downloads:
Sample add-in for Delphi 5 - 2010