Export (0) Print
Expand All
Cut
Run
Expand Minimize

SaveAll Method

Visual Studio .NET 2003

Saves all documents currently open in the environment.

[Visual Basic .NET]
Public Sub SaveAll() 
[Visual Basic 6]
Sub SaveAll() 
[C++]
HRESULT __stdcall SaveAll();
[C#]
public void SaveAll();
[JScript .NET]
public function SaveAll()

Example

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

See Also

SaveAll Method | Saved Property (General Extensibility)

Applies To: Documents Collection

Show:
© 2014 Microsoft