Table of contents
Collapse the table of content
Expand the table of content

Page.DropIntoList Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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.


NameRequired/OptionalData TypeDescription
ObjectToDropRequiredIUnknownThe source of the shape to drop into the list. Can be a Master , Selection , Shape , or IDataObject object. See Remarks for more information.
TargetListRequiredShapeThe list into which to drop ObjectToDrop.
lPositionRequiredLongThe position in the 1-based list to add the shape.

Return Value



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.


The following Visual Basic for Applications (VBA) example shows how to use the DropIntoList method to add a new shape to an existing list on the active page, in the first position in the list.

Application.ActivePage.DropIntoList vsoMaster, vsoListShape, 1
© 2018 Microsoft