Edit

Share via


XDocuments3.New(Object, Int32) Method

Definition

Creates a new Microsoft InfoPath form based on the specified form.

public:
 Microsoft::Office::Interop::InfoPath::SemiTrust::XDocument ^ New(System::Object ^ varURI, int dwBehavior);
public Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument New (object varURI, int dwBehavior);
abstract member New : obj * int -> Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument
Public Function New (varURI As Object, dwBehavior As Integer) As XDocument

Parameters

varURI
Object

Specifies the Uniform Resource Identifier (URI) of a form.

dwBehavior
Int32

Default value is 1. A value that specifies how the form should be opened. The values are based on the XdDocumentVersionMode enumeration.

Returns

An XDocument object that represents the new form.

Implements

Remarks

The New method can only be used to create a new form based on an existing form; it cannot be used to create a new form based on a form template. To create a form from a form template, use the NewFromSolution(Object) method.

When you use the New method, the new 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.

Applies to