_XDocument2.IsNew Property

Gets a value that indicates whether a newly created 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 _XDocument2
Dim value As Boolean

value = instance.IsNew
bool IsNew { get; }

Property Value

Type: System.Boolean

Implements

_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

_XDocument2 Interface

_XDocument2 Members

IsNew Overload

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace