XDocuments2.Close 方法 (Object)

关闭指定的 Microsoft InfoPath 表单。

命名空间:  Microsoft.Office.Interop.InfoPath.SemiTrust
程序集:  Microsoft.Office.Interop.InfoPath.SemiTrust(位于 Microsoft.Office.Interop.InfoPath.SemiTrust.dll 中)

语法

声明
Sub Close ( _
    varIndex As Object _
)
用法
Dim instance As XDocuments2
Dim varIndex As Object

instance.Close(varIndex)
void Close(
    Object varIndex
)

参数

  • varIndex
    类型:System.Object

    该表达式指定 XDocumentsCollection 的成员的位置。如果是数值表达式,该参数必须为介于 0 与 Count 的值减去 1 之间的数字。如果是字符串表达式,该参数必须为该集合成员的统一资源定位器 (URL) 路径。

实现

XDocuments.Close(Object)

备注

Close 方法可在不退出 InfoPath 应用程序的情况下关闭当前打开的表单。表单将无条件关闭,这表示不会保存对表单中数据所做的任何更改。

示例

thisApplication.XDocuments.Close(0);

另请参阅

引用

XDocuments2 接口

XDocuments2 成员

Close 重载

Microsoft.Office.Interop.InfoPath.SemiTrust 命名空间