Add-in Outllook 2010 Context menu and drag/drop handling RRS feed

  • Question

  • Hi,

    I have created custom folders in outlook and want to disable context menu and drag and drop functionality on them.

    MSDN blogs says context menu can only be changed via ribbon xml in outlook 2010. I have already done some work using ribbon designer. I just don't want to change my existing work. Can I achieve my desired functionality using ribbon designer without migrating it to xml?

    Second, The most of the folder events are obsolete now so How can I disable drag and drop operations on folders in outlook 2010?

    Thursday, April 3, 2014 7:56 AM


  • Hello Haris,

    The Outlook object model doesn't allow to disable drag and drop operations. Instead, you can handle the ItemAdd event of the Items class which is fired when one or more items are added to the specified collection. So, you can see what items are moved to the folder and the delete them or move them back if required.

    Unfortunately the Ribbon designer doesn't provide all features of Ribbon UI extensibility. I'd suggesting learning the Ribbon XML markup. See the Ribbon Overview section in MSDN for more information.

    The Extending the User Interface in Outlook 2010 article describes context menus in depth. There you can find a sample add-in which is referred in the article.

    Also you may find the Customize Outlook UI with VSTO Ribbon designer (CSOutlookUIDesigner) sample add-in project in C# helpful.

    Thursday, April 3, 2014 2:33 PM