Compartir a través de


Documents.CloseAll(vsSaveChanges) Method

Definition

Closes all open documents in the environment and optionally saves them.

void CloseAll(EnvDTE::vsSaveChanges Save = EnvDTE.vsSaveChanges.vsSaveChangesPrompt);
[System.Runtime.InteropServices.DispId(5)]
public void CloseAll (EnvDTE.vsSaveChanges Save = EnvDTE.vsSaveChanges.vsSaveChangesPrompt);
[<System.Runtime.InteropServices.DispId(5)>]
abstract member CloseAll : EnvDTE.vsSaveChanges -> unit
Public Sub CloseAll (Optional Save As vsSaveChanges = EnvDTE.vsSaveChanges.vsSaveChangesPrompt)

Parameters

Save
vsSaveChanges

Optional. A vsSaveChanges constant representing how to react to changes made to documents.

Attributes

Examples

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  

Applies to