Drops the specified object into the specified list at the specified position. Returns the newly dropped shape.
expression .DropIntoList(ObjectToDrop, TargetList, lPosition)
expression An expression that returns a Page object.
The list into which to drop ObjectToDrop.
The position in the 1-based list to add the shape.
If ObjectToDrop is a Selection object, the selection can contain only a single shape.
If ObjectToDrop is an IDataObject, it must be associated with a local Microsoft Visio object that is in the same instance as the page on which it is being dropped.
Visio returns an Invalid Target error if ObjectToDrop does not match the category requirements of the list or the container. Shapes can be assigned categories, and containers can have required and excluded categories.
Categories are user-defined strings that you can use to categorize shapes and, thereby, to restrict membership in a container. You can define categories in the User.msvShapeCategories cell in the ShapeSheet for a shape. You can define multiple categories for a shape by separating the categories with semicolons.
If ObjectToDrop is not a Microsoft Visio object, or if it does not contain top-level shapes on the page, Microsoft Visio returns an Invalid Parameter error.
If the ContainerProperties.LockMembership property of the list is True, Visio returns a Disabled error.