CustomXMLPart Object

Office Developer Reference

Represents a single CustomXMLPart in a CustomXMLParts collection.

Aa433853.vs_note(en-us,office.12).gif  Note
References to DTDs from custom XML parts are not supported. DTD references in custom XML parts will not resolve, and custom XML parts containing DTD references generate an exception when an attempt is made to save the file's content to a flat XML file.

Example

The following example adds a part to a CustomXMLPart object.

Visual Basic for Applications
  Sub AddPartToCollection()
    Dim myPart As CustomXMLPart
Set myPart = ActiveDocument.CustomXMLParts.Add("<author>Mark Twain</author>")

End Sub

See Also