Overwriting a PDF/XPS document from 'Save As' dialog RRS feed

  • Question

  • Hiya

    In my app, I create a Word document using automation and show the 'Save As' dialog so the user can save it. If the user selects a file format other than PDF/XPS, attempting to overwrite an existing file shows a pop-up warning dialog with the option to overwrite. If the user selects PDF/XPS and attempts to overwrite an existing file, clicking 'Save' does nothing - no pop-up, no nothing. The user has to manually delete the original file if he wants to 'overwrite' it.

    If I try the same thing from stand-alone Word, it behaves as expected - attempting to overwrite any file type shows a pop-up warning.

    My code is as follow (using C++):

    CDialogs Dialogs = m_wordApplication.get_Dialogs();
    CDialog0 Dialog = Dialogs.Item(Word::dwDialogFileSaveAs);

    I'm using Word 2007, which I /think/ uses a plug-in to support PDF/XPS.

    Anyone seen similar before? Any clues?



    Thursday, August 1, 2013 9:17 AM


  • Hiya

    Just an update for anyone else who runs into this issue:


    That line enables the display of alerts/messages when running a macro, which fixes my problem.



    • Marked as answer by Somnolent Monday, August 19, 2013 1:18 PM
    Monday, August 19, 2013 1:18 PM