ItemOperations::PromptToSave Property
Visual Studio 2015
Gets all unsaved files and allows the user to save one or more of them.
Assembly: EnvDTE (in EnvDTE.dll)
Property Value
Type: EnvDTE::vsPromptResultA vsPromptResult value describing the user's action after displaying a dialog box.
PromptToSave allows the user to save open documents similar to when the IDE is closed. Calling PromptToSave, however, does not mean that all documents are automatically saved. Rather, it gives the user the opportunity to save some or all open documents.
Sub PromptToSaveExample() Dim myVal As EnvDTE.vsPromptResult myVal = DTE.ItemOperations().PromptToSave() MsgBox(myVal.ToString) End Sub
Show: