views:

43

answers:

1

I'm trying to create a Export method of a VCF file to our CRM application.

I'm running the new VS 2010 but target the project as .NET 3.5

what is the technique to hook up into this context menu?

alt text

I'm very new to AddIns but as a logical line of thought is to create an Outlook AddIn, but I'm failing miserably to add a menu item to this context menu :(

Thank you for any help on this

A: 

Got it

alt text

this.Application.AttachmentContextMenuDisplay += 
    new Outlook.ApplicationEvents_11_AttachmentContextMenuDisplayEventHandler(ThisAddIn_AttachmentContextMenuDisplay);

and then in the eventHandler

private void ThisAddIn_AttachmentContextMenuDisplay(Office.CommandBar commandBar, Outlook.AttachmentSelection attachments)
{
    if (attachments.Count > 0)
    {
        Office.CommandBarControl cbc = commandBar.Controls.Add(
                  Office.MsoControlType.msoControlButton, 
                  missing, missing, missing, true);

        cbc.Caption = "Export into SuperOffice";
        cbc.OnAction = "Action";
    }
}
balexandre