2 callbacks when changing views; repurpose view change in office 2007 RRS feed

  • Question

  • I created a new powerpoint 2007 add-in, added ribbon xml which looks like this

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="" onLoad="Ribbon_Load">
        <command idMso="ViewNormalViewPowerPoint" onAction ="NormalView_click"/>
        <command idMso ="ViewSlideSorterView" onAction="SorterView_click"/>
          <tab idMso="TabAddIns">
            <group id="MyGroup"
                   label="My Group">

    In ribbon.cs I have the following callbacks

    public void SorterView_click(Office.IRibbonControl control, bool pressed, ref bool cancel)
                cancel = false;
    public void NormalView_click(Office.IRibbonControl control, bool pressed, ref bool cancel)
                cancel = false;

    I added a breakpoint in each of the callbacks, opened powerpoint 2007 and changed the view from Normal view to Slide Sorter view. When I hit the button for Slide Sorter view the code hits the breakpoint in the SorterView function, and then right after hits the breakpoint in NormalView function. 

    This has to be a bug(?) this does not happen in office 2010. How would you get around this when my callbacks have different code to control different states in my Office Add-in? Do I really need to take care of this in my code?

    Thursday, March 15, 2012 12:17 PM

All replies

  • Hi MartinMyth,

    Thanks for posting in the MSDN Forum.

    I can reproduce your issue on my side. I'm wondering what you will do when the SorterView button clicked. I think I'm not able to give you any suggestion if I don't know it. And I will check all of the reports which we received to see whether it need fix or it has been fixed etc.. It will make more sense if you can provide your Office version like "12.0.****.****".

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, March 16, 2012 5:29 AM
  • Hi Tom,

    My version of Office 2007 is 12.0.6612.1000.

    I perform actions regarding the visibility of my CustomTaskPane in the different views. I can only find one solution to this and that is to always disregard the second callback. Not a good solution at all!

    I also struggling with repurposing Notes page, Slide Master, Handout Master and Notes Master views. I don't get any callback for these views. It works in 2010, possible bug this too?

    Friday, March 16, 2012 7:17 AM
  • Hello Martin,

    The fact that you have code that works with PowerPoint 2010 but not with PowerPoint 2007 implies that the problem is with Office 2007, not with your program code.

    Reporting bugs to Microsoft Development is the job of Microsoft Customer
    Support engineers and Microsoft Technical Account Managers.

    Because of the complexity of your project please consider opening a technical
    support incident with Microsoft Customer Technical Support. If the Customer Support Engineer confirms
    that the issue is a bug the charge for the incident will be refunded. Otherwise
    the Engineer will work with you to resolve the issue to your satisfaction.

    To view the options for using Customer support please visit the following link:;en-us;offerprophone

    Chris Jensen

    Tuesday, March 20, 2012 6:07 PM