Documents.CloseAll 方法

关闭环境中所有打开的文档并可选择保存它们。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
Sub CloseAll ( _
    Save As vsSaveChanges _
)
void CloseAll(
    vsSaveChanges Save
)
void CloseAll(
    [InAttribute] vsSaveChanges Save
)
abstract CloseAll : 
        Save:vsSaveChanges -> unit 
function CloseAll(
    Save : vsSaveChanges
)

参数

示例

Sub CloseAllExample()
  ' Before running, create a text file or other document window.
  Dim docs As Documents
  Dim doc As Document
  Dim win As Window

  docs = documents
  docs.SaveAll()
  doc = dte.ActiveDocument
  win = doc.NewWindow()
  doc.Save("c:\temp\docsave.txt")
  msgbox(doc.Selection().text)
  docs.CloseAll(vsSaveChanges.vsSaveChangesPrompt)
End Sub

.NET Framework 安全性

请参见

参考

Documents 接口

EnvDTE 命名空间