Compartilhar via


CustomXMLParts.PartAfterAdd Event

Office Developer Reference

Occurs just after a CustomXMLPart object is added to the CustomXMLParts collection.

Aa433592.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.

Syntax

expression.PartAfterAdd(NewPart, )

   An expression that returns a CustomXMLParts object.

Parameters

Name Required/Optional Data Type Description
NewPart Required CustomXMLPart The part that was added.

Example

The following example displays the XML contents of a part after it has been added to a CustomXMLParts collection.

Visual Basic for Applications
  Sub CustomXMLParts_PartAfterAdd(ByVal objPart As CustomXMLPart)
Dim strPartXML As String
strPartXML = objPart.XML
   MsgBox ("The part's contents are: " & vbCrLf & strPartXML)
End Sub

See Also