Share via


Error.ErrorCode property

Gets or sets the error code of an ErrorObject object.

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

Syntax

'Declaration
Property ErrorCode As Integer
    Get
    Set
'Usage
Dim instance As Error
Dim value As Integer

value = instance.ErrorCode

instance.ErrorCode = value
int ErrorCode { get; set; }

Property value

Type: System.Int32

Remarks

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 ErrorCode property of the Error object is used to display the error code number of an error in a message box:

ErrorObject er = thisXDocument.Errors[0];
IXMLDOMNode myNode = er.Node;
thisXDocument.UI.Alert("this is the error code: " + er.ErrorCode);

See also

Reference

Error interface

Error members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace