none
COM C++ Office 2016 Addin - Changing "Saved" property has no effect RRS feed

  • Question

  • Hey,

    We are developing a COM based Office addin. We encountered a situation where we need to prevent Office from displaying the "Save-on-close" message box. 

    According to the documentation here: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.saved , changing this property to msoTrue should prevent the message box from appearing when the user closes a document.

    Unfortunately, changing this has no effect. We see that the value of the Saved property changed by trying to get it, but the message box still appears.

    Is this is a known bug? If so, how can we report it?

    Thanks!


    • Edited by dannyb791 Thursday, July 11, 2019 7:21 AM
    Wednesday, July 10, 2019 10:37 AM

All replies

  • Hello,

    Do you get any dialog message boxes if you call the Save method of the Presentation class?

    With Application.ActivePresentation
        If Not .Saved And .Path <> "" Then .Save
    End With

    Looks like a bug because the description says the following:

    If the Saved property of a modified presentation is set to msoTrue, the user won't be prompted to save changes when closing the presentation, and all changes made to it since it was last saved will be lost.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Thursday, July 11, 2019 7:19 AM
  • Hey,

    If I call the save manually it performs a save for opened documents but opens the save-as dialog for new documents. 

    I guess I have no choice but to open a bug report in the feedback system.

    Thanks for your help.

    Sunday, July 14, 2019 6:56 AM