Compartilhar via


Documents Interface

Definition

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

public interface class Documents : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface Documents : System.Collections.IEnumerable
[System.Runtime.InteropServices.Guid("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
public interface Documents : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type Documents = interface
    interface IEnumerable
[<System.Runtime.InteropServices.Guid("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")>]
type Documents = interface
    interface IEnumerable
Public Interface Documents
Implements IEnumerable
Attributes
Implements

Examples

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  

Remarks

Reference this collection by using DTE.Documents.

Properties

Count

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

DTE

Gets the top-level extensibility object.

Parent

Gets the immediate parent object of a Documents collection.

Methods

Add(String)

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)

Microsoft Internal Use Only.

SaveAll()

Saves all documents currently open in the environment.

Applies to