Show All

# ImportFile Method

Imports the specified form into the current form.

expression.ImportFile(ByVal bstrFileURI As String)

expression Required. An expression that returns a reference to an XDocument object.

bstrFileURI Required String. The Uniform Resource Identifier (URI) of the form that is to be imported (merged) into the currently open form.

## Security Level

2: 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.

## Remarks

Using the object model to programmatically import a form is equivalent to performing a merge operation in the user interface.

## Example

In the following example, the ImportFile method of the XDocument object is used to import a form:

    XDocument.ImportFile("C:\SomeOtherForm.xml");

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp