Documents Interface

 

Contains all Document objects in the environment, each representing an open document.

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

[GuidAttribute("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
public interface class Documents : IEnumerable

NameDescription
System_CAPS_pubpropertyCount

Gets a value indicating the number of objects in the Documents collection.

System_CAPS_pubpropertyDTE

Gets the top-level extensibility object.

System_CAPS_pubpropertyParent

Gets the immediate parent object of a Documents collection.

NameDescription
System_CAPS_pubmethodAdd(String^)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.

System_CAPS_pubmethodCloseAll(vsSaveChanges)

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

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator for items in the collection.

System_CAPS_pubmethodItem(Object^)

Returns an indexed member of a Documents collection.

System_CAPS_pubmethodOpen(String^, String^, Boolean)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.

System_CAPS_pubmethodSaveAll()

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
Return to top
Show: