Export (0) Print
Expand All

Documents Collection

Visual Studio .NET 2003

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

DTE

   Documents

[Visual Basic .NET]
Public Interface Documents
    Inherits IDispatch
[Visual Basic 6]
Class Documents
[C++]
interface Documents : IDispatch
[C#]
public interface Documents : IDispatch
[JScript .NET]
public interface Documents extends IDispatch

Remarks

Reference this collection using DTE.Documents.

Requirements

Namespace: EnvDTE

File: dte.tlb

Example

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

See Also

Document Object | TextDocument Object

Properties, Methods, and Events

Show:
© 2014 Microsoft