Customizing the Context Menu of a Contact Card in Outlook 2010
Summary: Create an add-in to add a custom item to the context menu of the new Contact Card feature in Microsoft Outlook 2010.
Applies to: Office 2010 | Outlook 2010 | Visual Studio
Published: December 2009
Provided by: Brian A. Randell, MCW Technologies, LLC
Microsoft Outlook 2010 introduces a new user interface element called the Contact Card. The Contact Card exposes a context menu that you can use to add your own menu items. This Visual How To explains how to create an add-in by using Visual Studio Tools for Office 2010 to customize the Contact Card context menu.
This Visual How To shows how to add a menu item to the Contact Card context menu. Choosing the menu item displays the SMTP address of the selected contact.
You can use a Visual Studio Tools for Office add-in to run your compiled code inside Outlook and to interact with the Outlook object model.
To create the add-in
To customize the Microsoft Office Fluent UI context menu, you must use a Ribbon (XML) type, which requires an XML file that describes the user interface elements and a source file that contains your code.
To customize the context menu item
You must modify the existing GetCustomUI method so that it passes your XML to Outlook 2010 when Outlook 2010 asks for customizations to the Contact Card context menu.
To display your customization in Outlook
At this point, you can add your custom method. In this example, you access the current contact and try to determine the contact's SMTP address.
To call your custom method
Although this is a simple example, it shows that after you know how to customize the context menu, you have access to a rich set of solutions.
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/0a915db6-71cc-4dfc-88ee-47e19856ba19]