CustomXMLSchema.Delete 方法 (Office)
从 CustomXMLSchema 集合中删除指定的架构。
语法
表达式。删除
表达 返回 CustomXMLSchema 对象的表达式。
备注
如果对已验证或附加到数据流的集合中的架构尝试此操作,则不会执行该操作,并显示错误消息。
示例
以下示例将架构添加到集合,然后删除该架构。
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
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。