Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetValidationError method

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


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

Type: System.Object

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

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.

© 2015 Microsoft