C# examples of Outlook add-in and PowerPoint plugin

C# Outlook and PowerPoint samples

These C-sharp how-to examples work for PowerPoint and Outlook 2021, 2019, 2016, 2013, 2010, 2007, 2003 and lower. They explain the following aspects of add-in development:

You may also be interested in:

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.

C# Outlook add-in

How to program your first Outlook addin

This example demonstrates how to write an Outlook COM add-in in C# that works across all versions from 2000 to Outlook 2021/365. It shows how to develop command bars and toolbar controls, create Ribbon controls in Ribbon tabs and Outlook menu, make and control Outlook forms, add custom property pages to the Tools | Options and Folder Properties dialogs and more.

Also, please see the complete list of features for Outlook plugin development, a step-by-step example of building an Outlook COM add-in, and a video tutorial How to write Outlook plug-in.
Download

How to place a .NET control onto an Outlook toolbar

This sample addin intercepts the SelectionChange event of Outlook Explorer and displays selected properties of the currently selected MailItem in a UserControl that is added to a new toolbar. Find more about how to customize Outlook toolbar with .NET controls.
Download

How to handle the ItemSend event

This C# Outlook plugin shows how to handle the ItemSend event in Microsoft Outlook 2021 - 2003.
Download

How to add an Outlook Explorer context menu item

This sample shows how to add a new menu item to the context menu / pop-up menu of Outlook Explorer.
Download

How to work with Outlook Recipients collection

This example unveils the capabilities of the Recipients collection, Recipient and AddressEntry objects. Using these objects developers can get all necessary information about email recipients, add, remove or modify addresses.
Download

How to exchange data using Attachments collection

Usually Outlook developers use the MailItem.UserProperties collection to send and receive additional information with email messages. This Outlook C# plugin suggests a slightly different approach – using the Attachments collection and a powerful .NET feature known as Serialization.
Download

How to intercept all incoming mails in Outlook

How to intercept all incoming mails in different ways: using NewMail and NewMailEx events, Extended MAPI notifications, by scanning Outlook folders.
Download

Outlook items and folders

How to process Open, Read, Reply, ReplyAll and Send events for a mail, task, appointment items

This C-sharp add-in shows how to use the Outlook Item Events class to process the events of an Outlook item.
Download

How to handle events of an Outlook item

C# code sample explain how to connect to and disconnecting from Outlook events and handle events of an Outlook item correctly.
Download

How to work with Outlook item events

This C# addin for Outlook explains what each of the item events does: InspectorActivate, ExplorerActivate, ItemSend, BeforeCheckNames, OnReply, OnForward and others.
Download

How to handle events of Outlook items and folders

This sample addin accompanies the blog post that has a closer look at two classes provided by Add-in Express: the Outlook Folders Events class and the Items Events class: Outlook items and folders events explained.
Download

How to determine if an item was added to, changed in, or removed from a given folder(s)

This C# Outlook plugin shows on how to use the Items Events class and process the ItemAdd, ItemChange, and ItemRemove events of the MAPIFolder interface Items collection.
Download

How to determine if an Outlook folder was created, moved or deleted

This example shows how to use the Outlook Folders Events class and process the FolderAdd, FolderChange, and FolderRemove events of the Folders collection of the MAPIFolder interface.
Download

How to create and delete hidden Outlook items via Extended MAPI

This sample C# Outlook addin shows how to get, create and delete a hidden item in Outlook and Exchange with MAPI Store Accessor.
Download

Outlook views and forms

Outlook regions – pane instances, moving pane to another region, and multi-DPI

This sample project allows moving a pane to another region programmatically. Some regions have specific requirements; these are reflected in messages the add-ins shows. Also the example demonstrates how form instances are created by the ADXOlFromsManager component. Finally, the Log form demonstrates solving DPI-related problems by using WPF. More about creating Outlook forms and views with advanced regions. More about problems of using WinForm controls in multi-DPI environment.
Download installer
Download source code

How to set the visibility of the form in an Outlook advanced form region

This code sample shows how to hide and show the form embedded into Outlook Explorer and new mail Inspector windows.
Download

How to use events of Reading Pane, Navigation Pane, and To-Do bar

This C# add-in for Outlook demonstrates how you can make use of the events that are 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 to enhance Outlook bar, To-Do bar, Reading and Navigation panes.
Download

How to switch between the standard Outlook explorer view and your custom .NET form

This Outlook addin example shows how you can switch between the standard Outlook explorer view and your custom WinForm (ADXOlForm in the WebViewPane layout).
Download

How to share Outlook Views and changes between folders

This Outlook add-in written in C# explains how to create a custom Outlook folder view and apply it to two or more folders.
Download

How to customize Outlook view programmatically using C#

Learn how you can create a custom Outlook view for the Contacts folder and add your own button to the Outlook Ribbon.
Download

PowerPoint: C# addins

How to handle the SlideShowBegin event on PowerPoint presentation objects

This PowerPoint C# addin shows how to handle the SlideShowBegin event of presentation objects.
Download PowerPoint addin

How to create a scheduled PowerPoint presentation

This C# PowerPoint code sample demonstrates how to build a scheduled PPT presentation to enable the user to schedule when the presentation slides should be shown and for how long. You can find a detailed description of this sample on our technical blog: How to create a scheduled PPT presentation.
Download PowerPoint example