XDocuments3.Open Method (Object, Int32)
Opens the specified Microsoft InfoPath 2010 form.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Function Open ( _
varURI As Object, _
dwBehavior As Integer _
) As XDocument
'Usage
Dim instance As XDocuments3
Dim varURI As Object
Dim dwBehavior As Integer
Dim returnValue As XDocument
returnValue = instance.Open(varURI, dwBehavior)
XDocument Open(
Object varURI,
int dwBehavior
)
Parameters
varURI
Type: System.ObjectSpecifies the Uniform Resource Identifier (URI) of a form.
dwBehavior
Type: System.Int32Default value is 1. A value that specifies how the form should be opened. The values are based on the XdDocumentVersionMode enumeration.
Return Value
Type: Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument
An XDocument that represents the specified form.
Implements
XDocuments2.Open(Object, Int32)
XDocuments.Open(Object, Int32)
Remarks
The Open method can only be used to open a form; it cannot be used to open a form template. To create a form from a form template, use the NewFromSolution method. To create a form based on an existing form, use the New method.
When you use the Open method, the specified form opens in InfoPath and is ready to be filled out.
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.