SharonKo
SharonKo

Reputation: 619

Outlook "right click on contact" modifing

I'm trying to write Outlook 2010 add-in using Visual Studio 2013.

How can I modify the menu that is opened after I'm right-clicking a "contact card" in the Contacts page?

Upvotes: 1

Views: 297

Answers (1)

Claudio P
Claudio P

Reputation: 2203

This post on CodeProject could help link

Right click on the solution explorer, and add New Ribbon (XML) Item. Replace Generated XML with following:

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
      <contextMenus> 
        <contextMenu idMso="ContextMenuContactItem"> 
          <menuSeparator id="mniMailItemMenuSeparator" />
          <button id="customButton"
                  label="Name of your Menu Item"   insertBeforeQ="Copy"
                  getImage="LoadCustomImage"
                  onAction="OnMyButtonClick" /> 
        </contextMenu>
      </contextMenus>
  </customUI>

Now you just need to add the

OnMyButtonClick(Office.IRibbonControl control)

to your Ribbon1.cs code behind.

Upvotes: 1

Related Questions