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

CustomXMLSchema.Delete Method (Office)

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

Deletes the specified schema from the CustomXMLSchema collection.

Syntax

expression. Delete

expression An expression that returns a CustomXMLSchema object.

Remarks

If this operation is attempted on a schema in a collection that is already validated or attached to a data stream, then the operation is not performed and an error message is displayed.

Example

The following example adds a schema to the collection and then deletes the schema.

Sub DeleteSchema() 
    On Error GoTo Err 

    Dim objCustomXMLSchemaCollection As CustomXMLSchemaCollection 
    Dim objCustomXMLSchema As  CustomXMLSchema 

    ' Adds a schema to the collection. 
    objCustomXMLSchema.Add("urn:invoice:namespace")  

    ... 

    ' Deletes the schema. 
    objCustomXMLSchema.Delete 

    Exit Sub 

' Exception handling. Show the message and resume. 
Err: 
        MsgBox (Err.Description) 
        Resume Next 
End Sub

See also

Concepts

CustomXMLSchema Object

Other resources

CustomXMLSchema Object Members

© 2018 Microsoft