Table of contents
TOC
Collapse the table of content
Expand the table of content

CustomXMLValidationErrors Object (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Represents a collection of CustomXMLValidationError objects.

Example

The following example adds a custom part and then adds a child node to that part. Any errors that occur are added to the CustomXMLValidationErrors collection and then displayed in the Debug window.

Dim ValErrors As CustomXMLValidationErrors 
Dim ValError As CustomXMLValidationError 
Dim cxp1 As CustomXMLPart 
Dim intError As Integer 

On Error Go To validation_error 

 With ActiveDocument 

    ' Add and populate a custom xml part 
    set cxp1 = .CustomXMLParts.Add "<invoice>" 

    ' Add a node 
    cxp1.AddNode "<quantity>", "supplier", "urn:invoice:namespace" 

 End With 

If ValErrors.Count > 0 then 
   For Each ValError In ValErrors 
      DeBug.Print("Error name: " &amp; ValError.Name &amp; " Error description: " &amp; ValError.Text)  
   Next 
End If 

Exit Sub 

validation_error: 
   CustomXMLValidationErrors.Add(ValError.Name, ValError.Text)) 
Resume 

Methods

Name
Add

Properties

Name
Application
Count
Creator
Item
Parent

See also

Other resources

Object Model Reference

© 2017 Microsoft