次の方法で共有


Documents インターフェイス

環境内のすべての Document オブジェクトが含まれます。各オブジェクトは、開いているドキュメントを表します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
<GuidAttribute("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")> _
Public Interface Documents _
    Inherits IEnumerable
[GuidAttribute("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
public interface Documents : IEnumerable
[GuidAttribute(L"9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
public interface class Documents : IEnumerable
[<GuidAttribute("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")>]
type Documents =  
    interface
        interface IEnumerable
    end
public interface Documents extends IEnumerable

Documents 型で公開されるメンバーは以下のとおりです。

プロパティ

  名前 説明
パブリック プロパティ Count Documents コレクション内のオブジェクトの数を示す値を取得します。
パブリック プロパティ DTE トップレベルの機能拡張オブジェクトを取得します。
パブリック プロパティ Parent Documents コレクションの直接の親オブジェクトを取得します。

このページのトップへ

メソッド

  名前 説明
パブリック メソッド Add インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック メソッド CloseAll その環境で開いているすべてのドキュメントを閉じます。ドキュメントを閉じるときに、保存することもできます。
パブリック メソッド GetEnumerator() コレクションを反復処理する列挙子を返します。 (IEnumerable から継承されます。)
パブリック メソッド GetEnumerator() コレクション内の項目の列挙子を返します。
パブリック メソッド Item Documents コレクションのインデックス付きメンバーを返します。
パブリック メソッド Open インフラストラクチャ。 マイクロソフト内部でのみ使用します。
パブリック メソッド SaveAll その環境で現在開いているすべてのドキュメントを保存します。

このページのトップへ

解説

このコレクションを参照するには、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

参照

参照

EnvDTE 名前空間

Document