Documents Interface
Visual Studio 2015
Contains all Document objects in the environment, each representing an open document.
Assembly: EnvDTE (in EnvDTE.dll)
| Name | Description | |
|---|---|---|
![]() | Add(String^) | This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only. |
![]() | CloseAll(vsSaveChanges) | Closes all open documents in the environment and optionally saves them. |
![]() | GetEnumerator() | Returns an enumerator for items in the collection. |
![]() | Item(Object^) | Returns an indexed member of a Documents collection. |
![]() | Open(String^, String^, Boolean) | This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only. |
![]() | SaveAll() | Saves all documents currently open in the environment. |
Reference this collection by using DTE.Documents.
Sub DocumentsExample() ' Closes all saved documents. Dim iDoc As Integer For iDoc = 1 To DTE.Documents.Count If DTE.Documents.Item(iDoc).Saved Then DTE.Documents.Item(iDoc).Close() End If Next iDoc End Sub
Show:

