共用方式為


_XDocument3.ImportFile 方法

將指定的表單匯入目前的表單。

**命名空間:**Microsoft.Office.Interop.InfoPath
**組件:**Microsoft.Office.Interop.InfoPath (於 microsoft.office.interop.infopath.dll 中)

語法

'宣告
<DispIdAttribute(20)> _
Sub ImportFile ( _
    <InAttribute> bstrFileURI As String _
)
'用途
Dim instance As _XDocument3
Dim bstrFileURI As String

instance.ImportFile(bstrFileURI)
[DispIdAttribute(20)] 
void ImportFile (
    [InAttribute] string bstrFileURI
)

參數

  • bstrFileURI
    要匯入 (合併) 目前開啟表單之表單的統一資源識別元 (URI)。

備註

使用物件模型以程式設計方式匯入表單,相當於在使用者介面中執行合併作業。

範例

在下列範例中,XDocument 物件的 ImportFile 方法是用於匯入表單:

thisXDocument.ImportFile(@"C:\SomeOtherForm.xml");

請參閱

參考

_XDocument3 介面
_XDocument3 成員
Microsoft.Office.Interop.InfoPath 命名空間