Share via


Documents.SaveAll Method

Saves all documents currently open in the environment.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Sub SaveAll
'Usage
Dim instance As Documents

instance.SaveAll()
void SaveAll()
void SaveAll()
function SaveAll()

Examples

Sub SaveAllExample()
    ' 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

See Also

Reference

Documents Interface

Documents Members

EnvDTE Namespace