Share via


WPDObject.RemoveChild method

The RemoveChild method deletes a child object from this WPDObject.

Syntax

WPDObject.RemoveChild(
  wpdObject,
  [ boolRecursive ]
)

Parameters

wpdObject

A WPDObject that is the child object to be deleted. If the child object does not exist, this method returns an error.

boolRecursive [optional]

A Boolean value that indicates whether the delete operation is recursive. If the child object to be removed contains children, this parameter must be set or the method will fail. If the boolRecursive parameter is not specified, and the child object does not contain children, the default value of "false" is assumed, and a nonrecursive delete is performed.

Return value

This method does not return a value.

Remarks

To enable asynchronous behavior, set the handler for the onRemoveChildComplete event before calling this method.

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]

See also

WPDObject