Share via


_XDocument3.IsNew property

Gets a value that indicates whether a newly created Microsoft InfoPath form has been saved.

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

Syntax

'Declaration
ReadOnly Property IsNew As Boolean
    Get
'Usage
Dim instance As _XDocument3
Dim value As Boolean

value = instance.IsNew
bool IsNew { get; }

Property value

Type: System.Boolean

Implements

_XDocument2.IsNew
_XDocument.IsNew

Remarks

If the IsNew property is true, data in the form's underlying XML document has not been saved since the form was initially created. If false, the data in the new form's underlying XML document has been saved.

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.

Examples

In the following example, the IsNew property of the XDocument object is used to determine whether the data in a new form has been saved:

if (thisXDocument.IsNew)
{
 thisXDocument.UI.Alert("Please save your form.");
}

See also

Reference

_XDocument3 interface

_XDocument3 members

IsNew overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace