|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a XDocuments object.
|varURI||Required||Variant||Specifies the Uniform Resource Identifier (URI) of a form.|
When you use the NewFromSolution method, the new form opens in InfoPath and is ready to be filled out.
The NewFromSolution method can only be used to create a new form based on an existing form template; it cannot be used to create a new form based on a form. To create a form from an existing form, use the New method of the XDocuments collection.
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.
In the following example, the NewFromSolution method of the XDocuments collection is passed the URI of an existing form template, and a new form is created and its associated XDocument object returned: