Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Closes all open documents in the environment and optionally saves them.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Sub CloseAll ( _
Save As vsSaveChanges _
)
'Usage
Dim instance As Documents
Dim Save As vsSaveChanges
instance.CloseAll(Save)
void CloseAll(
vsSaveChanges Save
)
void CloseAll(
[InAttribute] vsSaveChanges Save
)
function CloseAll(
Save : vsSaveChanges
)
Parameters
Save
Type: EnvDTE.vsSaveChangesOptional. A vsSaveChanges constant representing how to react to changes made to documents.
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
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.