This documentation is archived and is not being maintained.

PromptToSave Property

Visual Studio .NET 2003

Displays all unsaved files and allows the user to save one or more of them.

[Visual Basic .NET]
Public ReadOnly Property PromptToSave() As vsPromptResult
[Visual Basic 6]
Property Get PromptToSave() As vsPromptResult
HRESULT __stdcall get_PromptToSave(
   /* [out, retval] */ vsPromptResult* retVal
public vsPromptResult PromptToSave {get;}
[JScript .NET]
public function get PromptToSave() : vsPromptResult

Return Value

Returns a vsPromptResult value describing the user's action after displaying a dialog box to them.


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 of the open documents.


Sub PromptToSaveExample()
   Dim myVal As EnvDTE.vsPromptResult
   myVal = DTE.ItemOperations().PromptToSave()
End Sub

See Also

Applies To: ItemOperations Object