VSTO Visio 2007 save as dialog for unsaved document RRS feed

  • Question

  • Using VISIO 2007, when i perform Doc.Save() for an unsaved document i received an error. I would like to trigger the save as dialog. any idea how can i do that?

    I tried as i did in powerpoint but it doesn't work...

    var fileDialog = ThisAddIn.Application.get_FileDialog(Office.MsoFileDialogType.msoFileDialogSaveAs);

    i will appreciate any help. Thanks in advance.

    Friday, November 16, 2012 7:35 PM


  • Hi Mandela,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that your code is come from Word automation or Word add-in. However Visio doesn't have Build-in Dialog settings. So the code which you shown me will not work. I would recommend you approach your goal via System.Windows.Forms' SaveFileDialog.

    Have a good day,


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

    Monday, November 19, 2012 4:55 AM