Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XMLNode.SetValidationError method

Changes the validation error text displayed to a user for a specified node and forces Microsoft Word to report a node as invalid.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
void SetValidationError(
	WdXMLValidationStatus Status,
	ref Object ErrorText,
	bool ClearedAutomatically
)

Parameters

Status
Type: Microsoft.Office.Interop.Word.WdXMLValidationStatus

Required WdXMLValidationStatus. Specifies whether to set the validation status error text (wdXMLValidationStatusCustom) or to clear the validation status error text (wdXMLValidationStatusOK).

ErrorText
Type: System.Object

Optional Object. The text displayed to the user. Leave blank when the Status parameter is set to wdXMLValidationStatusOK.

ClearedAutomatically
Type: System.Boolean

Optional Boolean. True automatically clears the error message as soon as the next validation event occurs on the specified node. False requires running the SetValidationError method with a Status parameter of wdXMLValidationStatusOK to clear the custom error text.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.