AddAt method

Microsoft Visio Developer Reference

AddAt method

       

Creates a new object at a specified index in a collection.

Version added

4.0

Syntax

objRet = object.AddAt(index)

objRet

The new object added to the collection.

object

Required. An expression that returns an object in the Applies to list.

index

Required Long. The index at which to add the object.

Remarks

If the index is zero (0), the object is added at the beginning of the collection.

The beginning of a Menus collection is the leftmost menu when the menus are arranged horizontally. For example, the File menu is the first menu in the Menus collection for the drawing window context.

The beginning of a MenuItems collection is the topmost menu item. For example, the New Window menu item is the first menu item in the MenuItems collection for the Window Menu object.

The beginning of a ToolbarItems collection is the leftmost item in a toolbar that is arranged horizontally.