Documents::CloseAll Method (vsSaveChanges)
Visual Studio 2015
Closes all open documents in the environment and optionally saves them.
Assembly: EnvDTE (in EnvDTE.dll)
Parameters
- Save
-
Type:
EnvDTE::vsSaveChanges
Optional. A vsSaveChanges constant representing how to react to changes made to documents.
Sub CloseAllExample() ' Before running, create a text file or other document window. Dim docs As Documents Dim doc As Document Dim win As Window docs = documents docs.SaveAll() doc = dte.ActiveDocument win = doc.NewWindow() doc.Save("c:\temp\docsave.txt") msgbox(doc.Selection().text) docs.CloseAll(vsSaveChanges.vsSaveChangesPrompt) End Sub
Show: