Share via


Error.ConditionName property

Gets the name of the ErrorObject object.

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

Syntax

'Declaration
ReadOnly Property ConditionName As Object
    Get
'Usage
Dim instance As Error
Dim value As Object

value = instance.ConditionName
Object ConditionName { get; }

Property value

Type: System.Object

Remarks

The ConditionName property is used only for custom errors; it is not used for schema validation–generated or system-generated errors. If the type of error is schema validation generated or system generated, the ConditionName property will return a null reference (Nothing in Visual Basic).

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 ConditionName property of an instance of the ErrorObject object is used to display the name of a custom error in a message box:

Error firstError = thisXDocument.Errors[0];
thisXDocument.UI.Alert("Error condition name: " + firstError.ConditionName);

See also

Reference

Error interface

Error members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace