for vsto developers please go here
if (Globals.ThisAddIn.Application.ActiveDocument.Path == String.Empty) { Word.Dialog dlg; Object timeout = 3000; dlg = Globals.ThisAddIn.Application.Dialogs[ Word.WdWordDialog.wdDialogFileSaveAs]; int result = dlg.Display(ref timeout); } else { Globals.ThisAddIn.Application.ActiveDocument.Save(); }
As a result, the button pressed will be saved (0 - cancel, 1- ok, 2- close)
Gomes source share