none
Outlook 2010 and Dialog Box Launcher RRS feed

Answers

  • Did you add the click event handler to the code generated by the designer for the ribbon group? For a group grpAR that would be something like this:
     

    this.grpAR.DialogLauncherClick+=new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(grpAR_DialogLauncherClick);

    That can go in the designer or in the load event for that ribbon.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "niyack" <=?utf-8?B?bml5YWNr?=> wrote in message news:3c7bec64-2b0f-4e74-9ece-9b819e1edf42...
    could you maybe post a sample project to that I can see how you got yours to work?

    Ken Slovak MVP - Outlook
    Thursday, August 2, 2012 6:27 PM
    Moderator
  • Ken, that was the one piece that I was missing.

    Once I added that one line, everything worked as expected.

    Thank you very much for all of your help

    • Marked as answer by niyack Tuesday, August 7, 2012 11:58 AM
    Tuesday, August 7, 2012 11:58 AM

All replies

  • Dumb question, are you using a VSTO adddin?
     
    Have you added a Click event handler to your code? Show your code if so.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "niyack" <=?utf-8?B?bml5YWNr?=> wrote in message news:09763e09-e181-4f5c-be04-143533002ce2...

    I am developing a custom ribbon for Outlook 2010 and I need to add a Dialog Box Launcher to the group in the custom ribbon. I have followed http://msdn.microsoft.com/en-us/library/microsoft.office.tools.ribbon.ribbongroup.dialoglauncherclick.aspx however when I click on the icon on the bottom right of the group, nothing happens. I double checked everything that I could think of and still no luck.

    When one clicks on the icon, it acts like it is not linked to any code yet I have code there

    Can someone help me please?????


    Ken Slovak MVP - Outlook
    Wednesday, August 1, 2012 4:45 PM
    Moderator
  • yes I am using VSTO and I am using the same code as listed in the link

    void grpClass_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)
            {
                advancedSettingsDialog dlg = new advancedSettingsDialog();
                dlg.ShowDialog();
            }

    Maybe I have this in the wrong file? I currently have it in MessageRibbon.Designer.cs

    Which file should it be placed in?


    • Edited by niyack Wednesday, August 1, 2012 5:25 PM
    Wednesday, August 1, 2012 5:25 PM
  • I put it in the MessageRibbon.cs file equivalent in my test bed VSTO solution. In my case the group is called "grpAR" and I added the code/handler like so, whic seemed to work OK:
     

    private event RibbonControlEventHandler DialogLauncherClick;

    void grpAR_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)

    {

        MessageBox.Show("Test");

        //advancedSettingsDialog dlg = new advancedSettingsDialog();

        //dlg.ShowDialog();

    }


    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "niyack" <=?utf-8?B?bml5YWNr?=> wrote in message news:67ee65d5-45b8-4918-9076-b8732fde0ded...

    yes I am using VSTO and I am using the same code as listed in the link

    void grpClass_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)
            {
                advancedSettingsDialog dlg = new advancedSettingsDialog();
                dlg.ShowDialog();
            }

    Maybe I have this in the wrong file? I currently have it in MessageRibbon.Designer.cs

    Which file should it be placed in?



    Ken Slovak MVP - Outlook
    Wednesday, August 1, 2012 5:52 PM
    Moderator
  • Sorry, typo. That should have been:
     

    private event RibbonControlEventHandler grpAR_DialogLauncherClick;

    void grpAR_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)


    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Ken Slovak" <=?utf-8?B?S2VuIFNsb3Zhaw==?=> wrote in message news:752e5cb7-7906-46c0-b4a2-6669da4a65a8...
    I put it in the MessageRibbon.cs file equivalent in my test bed VSTO solution. In my case the group is called "grpAR" and I added the code/handler like so, whic seemed to work OK:
     

    private event RibbonControlEventHandler DialogLauncherClick;

    void grpAR_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)

    {

        MessageBox.Show("Test");

        //advancedSettingsDialog dlg = new advancedSettingsDialog();

        //dlg.ShowDialog();

    }


    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "niyack" <=?utf-8?B?bml5YWNr?=> wrote in message news:67ee65d5-45b8-4918-9076-b8732fde0ded...

    yes I am using VSTO and I am using the same code as listed in the link

    void grpClass_DialogLauncherClick(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)
            {
                advancedSettingsDialog dlg = new advancedSettingsDialog();
                dlg.ShowDialog();
            }

    Maybe I have this in the wrong file? I currently have it in MessageRibbon.Designer.cs

    Which file should it be placed in?



    Ken Slovak MVP - Outlook

    Ken Slovak MVP - Outlook
    Wednesday, August 1, 2012 5:54 PM
    Moderator
  • when I do as you suggested, it says:

    The type 'OutlookAddIn1.MessageRibbon' already contains a definition for 'grpAR_DialogLauncherClick'

    Wednesday, August 1, 2012 6:06 PM
  • could you maybe post a sample project to that I can see how you got yours to work?
    Wednesday, August 1, 2012 8:05 PM
  • Did you add the click event handler to the code generated by the designer for the ribbon group? For a group grpAR that would be something like this:
     

    this.grpAR.DialogLauncherClick+=new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(grpAR_DialogLauncherClick);

    That can go in the designer or in the load event for that ribbon.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "niyack" <=?utf-8?B?bml5YWNr?=> wrote in message news:3c7bec64-2b0f-4e74-9ece-9b819e1edf42...
    could you maybe post a sample project to that I can see how you got yours to work?

    Ken Slovak MVP - Outlook
    Thursday, August 2, 2012 6:27 PM
    Moderator
  • Ken, that was the one piece that I was missing.

    Once I added that one line, everything worked as expected.

    Thank you very much for all of your help

    • Marked as answer by niyack Tuesday, August 7, 2012 11:58 AM
    Tuesday, August 7, 2012 11:58 AM