none
Intercepting the Save & Close button in appointment windows RRS feed

  • Question

  • Hello all,

    This is meant to inform Outlook developers about an issue in Outlook. If you know anything about the issue (say Office versions involved or any other details), don't hesitate to share your knowledge.

    In a couple of minutes, I'll send a link to this topic to the Outlook team hoping they will be able to reproduce the issue and fix it. Anyway, I'll post the final result here.

    So, an Add-in Express customer reported an issue that I reproduce using a VSTO add-in containing two meaningful parts:

    1) it provides this Ribbon XML:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="ribbonLoaded_Callback" loadImage="getImages_Callback">
      <commands>
        <command getEnabled="getEnabled_Callback" idMso="SaveAndClose" onAction="onSaveAndClose" />
      </commands>
    </customUI>

    2) it implements the onSaveAndClose method as follows:

    public void onSaveAndClose(Office.IRibbonControl control, bool cnacelDefault)
    {
        System.Windows.Forms.MessageBox.Show("!");
    }
    

    To reproduce the issue, you build the project, start Outlook (I use Version 1906 (Build 11727.20064 Click-to-Run), this is an Office Insider build), create a new appointment, and click the "Save and Close" button. Expected is: the onSaveAndClose method above is called. The issue is: the add-in doesn't receive that call.

    To confirm that the add-in works correctly, use the "Quick Access Toolbar" or "Customize Ribbon" tabs of the Word Options dialog to add the "Save and Close" Ribbon command to the QAT or a custom ribbon group; find that Ribbon command in the "Commands Not in the ribbon" list. If you click the button added, the method above is called. This is the expected behavior.

    I've captured a video; see the PowerPoint presentation at http://temp.add-in-express.com/support/Issues/Outlook/CannotInterceptClickingSaveAndCloseInOutlookAppointments.pptx. The test project is at http://temp.add-in-express.com/support/Issues/Outlook/OutlookAddIn4-InterceptingSaveAndCloseInAppointments.zip.


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader

    Please mark answers and useful posts to help other developers use the forums efficiently.

    Wednesday, June 12, 2019 8:13 AM

All replies

  • Hello,

    This is the end result, I assume:

    ===

    Thanks for your patience.

    Have been consulting with peers on this, this issue is outside our boundary of support, I would recommend you to reach out/report the issue to premier support using the link below and create a ticket

    https://support.microsoft.com/en-us/premier

    ===


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader

    Please mark answers and useful posts to help other developers use the forums efficiently.

    Wednesday, June 12, 2019 2:36 PM