_XDocument4.IsNew property

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

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

Syntax

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

value = instance.IsNew
bool IsNew { get; }

Property value

Type: System.Boolean
Returns Boolean.

Implements

_XDocument3.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.

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

_XDocument4 interface

_XDocument4 members

IsNew overload

Microsoft.Office.Interop.InfoPath namespace