Documents 介面
更新:2007 年 11 月
包含環境中的所有 Document 物件,每個物件代表一份已開啟文件。
命名空間: EnvDTE
組件: EnvDTE (在 EnvDTE.dll 中)
語法
<GuidAttribute("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")> _
Public Interface Documents _
Implements IEnumerable
Dim instance As Documents
[GuidAttribute("9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
public interface Documents : IEnumerable
[GuidAttribute(L"9E2CF3EA-140F-413E-BD4B-7D46740CD2F4")]
public interface class Documents : IEnumerable
public interface Documents extends IEnumerable
備註
使用 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