_XDocument3.ImportFile method (String)
Imports the specified form into the current form.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Sub ImportFile ( _
bstrFileURI As String _
)
'Usage
Dim instance As _XDocument3
Dim bstrFileURI As String
instance.ImportFile(bstrFileURI)
void ImportFile(
string bstrFileURI
)
Parameters
bstrFileURI
Type: System.StringThe Uniform Resource Identifier (URI) of the form that is to be imported (merged) into the currently open form.
Implements
_XDocument2.ImportFile(String)
_XDocument.ImportFile(String)
Remarks
Using the object model to programmatically import a form is equivalent to performing a merge operation in the user interface.
Important
This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
Examples
In the following example, the ImportFile method of the XDocument object is used to import a form:
thisXDocument.ImportFile(@"C:\SomeOtherForm.xml");