locked
How to add a context menu item to the menu shown for an attachment in received email ? RRS feed

  • Question

  • Hi everyone,

    For an attachment in a received email, we have the right click options like, Preview, Open, Save as, Print etc. Can my VSTO add-in add a menu item here ? That is, when user right clicks an attachment in receive email, I would like to add an option, say Save to <my_server>, and then on clicking that option, add-in would perform further action.

    Is this possible through VSTO or any other way / library to be used by VSTO add-in ?

     

    Thanks & best regards,

    Nadeem

    Monday, October 18, 2010 8:08 PM

Answers

All replies

  • What version of Outlook? Always mention what version you're developing against.
     
    In Outlook 2007 you can use the Application.AttachmentContextMenuDisplay() event. In 2010 you should use the new ribbon XML callback for that context menu.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "nadeem4n" <=?utf-8?B?bmFkZWVtNG4=?=> wrote in message news:0dd4c258-6488-434d-9f61-e23e6cdf92b2...

    Hi everyone,

    For an attachment in a received email, we have the right click options like, Preview, Open, Save as, Print etc. Can my VSTO add-in add a menu item here ? That is, when user right clicks an attachment in receive email, I would like to add an option, say Save to <my_server>, and then on clicking that option, add-in would perform further action.

    Is this possible through VSTO or any other way / library to be used by VSTO add-in ?

     

    Thanks & best regards,

    Nadeem


    Ken Slovak MVP - Outlook
    Monday, October 18, 2010 10:23 PM
  • Thanks a lot Ken Slovak,

     

    Sorry I forgot to mention Outlook version, I meant it for 2007 & 2010.

    I got your point about 2007 version. Could you please guide me a little more about 2010 version ?

     

    Best regards,

    Nadeem

    Monday, October 18, 2010 10:46 PM
  • Hi,

    Here is guide about context menus in 2010: http://msdn.microsoft.com/en-us/library/ee691832.aspx.

    The id of the context menu is ContextMenuAttachments.

    Regards,

    Mauro


    castagnasso.wordpress.com
    • Marked as answer by nadeem4n Tuesday, October 19, 2010 8:32 AM
    Tuesday, October 19, 2010 12:29 AM
  • Thank you Mauro.
    Tuesday, October 19, 2010 8:33 AM
  • Did you need any information other than what Mauro provided?

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "nadeem4n" <=?utf-8?B?bmFkZWVtNG4=?=> wrote in message news:8f24547c-6e6b-4309-9064-87281c8a73b3...

    Thanks a lot Ken Slovak,

     

    Sorry I forgot to mention Outlook version, I meant it for 2007 & 2010.

    I got your point about 2007 version. Could you please guide me a little more about 2010 version ?

     

    Best regards,

    Nadeem


    Ken Slovak MVP - Outlook
    Tuesday, October 19, 2010 1:25 PM
  • No Ken, I have achieved it through yours & Mauro's guidance.

     

    Thanks a lot for your help :)

    Tuesday, October 19, 2010 4:22 PM