Edit

Share via


XMLNode.RemoveChild method (Word)

Removes a child element from the specified element.

Syntax

expression. RemoveChild( _ChildElement_ )

expression An expression that returns an XMLNode object.

Parameters

Name Required/Optional Data type Description
ChildElement Required XMLNode The child element to be removed.

Return value

Nothing

Example

The following example removes the first child from the first element in the active document.

ActiveDocument.XMLNodes(1).RemoveChild _ 
 ActiveDocument.XMLNodes(1).ChildNodes(1)

See also

XMLNode Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.