Share via


XDocuments3.NewFromSolutionWithData method (Object, Object, Int32)

Creates a new Microsoft InfoPath form using the specified XML data and form template.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Function NewFromSolutionWithData ( _
    varXMLData As Object, _
    varSolutionURI As Object, _
    dwBehavior As Integer _
) As XDocument
'Usage
Dim instance As XDocuments3
Dim varXMLData As Object
Dim varSolutionURI As Object
Dim dwBehavior As Integer
Dim returnValue As XDocument

returnValue = instance.NewFromSolutionWithData(varXMLData, _
    varSolutionURI, dwBehavior)
XDocument NewFromSolutionWithData(
    Object varXMLData,
    Object varSolutionURI,
    int dwBehavior
)

Parameters

  • varXMLData
    Type: System.Object

    Provides the XML data to be used as a template for the form. Can be a string that specifies the Uniform Resource Identifier (URI) of an XML document, or an XMLDOMNode that contains the XML to be used as the XML document (template).

  • varSolutionURI
    Type: System.Object

    Specifies the Uniform Resource Identifier (URI) of a form template file (an .xsf or .xsn file).

  • dwBehavior
    Type: System.Int32

    Reserved for future use. This value should be set to 1.

Return value

Type: Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument
An XDocument object that represents the new form.

Implements

XDocuments2.NewFromSolutionWithData(Object, Object, Int32)

Remarks

The following related methods of the XDocuments collection are also available:

  • The New method enables creating a new instance of InfoPath by using a specified XML document. The XML document must correspond to an InfoPath form. A new form is opened in InfoPath, using the supplied XML document as initial data, and its associated form template as specified in the processing instructions in the header of the document.

  • The NewFromSolution method enables creating a new instance of InfoPath using a specified form template, and its associated XML form (the initial template data).

The NewFromSolutionWithData method supports a scenario that is not provided by the foregoing two methods: specifying both the XML document used as initial data and the form template. The XML document does not need to have been created by InfoPath. It can be supplied either as a URI or as an XMLDOMNode.

When you use the NewFromSolutionWithData method, the new form opens in InfoPath and is ready to be filled out.

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.

See also

Reference

XDocuments3 interface

XDocuments3 members

NewFromSolutionWithData overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace