Click here to Skip to main content
15,892,298 members
Articles / Productivity Apps and Services / Microsoft Office

Customize the built-in Outlook Select Names dialog (or any other)

Rate me:
Please Sign up or sign in to vote.
4.90/5 (35 votes)
14 Jan 2015CPOL14 min read 167.5K   2.6K   67  
In this article, you will learn how to customize the built-in Select Names dialog and use different external data sources for your own dialog.
using System;

namespace CustomAddressDialog
{
    /// <summary>
    /// Delegate signature to inform the application about closed objects.
    /// </summary>
    /// <param name="id">The unique ID of the closed object.</param>
    public delegate void WrapperClosedDelegate(Guid id);

    /// <summary>
    /// The Wrapperclass itself has a unique ID and a closed event.
    /// </summary>
    internal abstract class WrapperClass
    {
        /// <summary>
        /// The event ocures when the monitored item has been closed.
        /// </summary>
        public event WrapperClosedDelegate Closed;

        /// <summary>
        /// The unique ID of the wrapped object.
        /// </summary>
        public Guid Id { get; private set; }

        protected void OnClosed()
        {
            if (Closed != null) Closed(Id);
        }

        /// <summary>
        /// The constructor creates a new unique ID.
        /// </summary>
        public WrapperClass()
        {
            Id = Guid.NewGuid();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) X4U electronix
Germany Germany
I'm a 1968 model, made in Germany.
After School transformed into an electronic engineer and started repairing computers in 1986. From PET till now In the IT-world. Currently employed as softwaredeveloper in a company creating solutions for pharmacies.
MCSE2000, MCSD, MCTS - Team Foundation Server, MCTS - Visual Studio Tools for Office.
Specialized in Outlook/Exchange custom development. Languages: german, english, C#, C++, VB.Net, VB6, SQL.
In 2006 received an award as MVP - Visual Developer VSTO by Microsoft.
Homepage: [http://www.x4u.de]

Comments and Discussions