Export (0) Print
Expand All

CustomXMLParts Object

Office 2007
Represents a collection of CustomXMLPart objects.
Aa433854.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.

Remarks

There are three default parts that are always created with a document. These are 'Cover pages', 'Doc properties' and 'App properties'. The last two were in previous versions of Microsoft Word but are now provided in XML form in the CustomXMLParts object collection

Example

The following example adds a node to a CustomXMLPart object that is part of the CustomXMLParts object collection.

Visual Basic for Applications
Sub AddPartToCollection()
    Dim myPart As CustomXMLPart

    Set myPart = ActiveDocument.CustomXMLParts.Add("<author>Mark Twain</author>")
    
End Sub



Community Additions

ADD
Show:
© 2014 Microsoft