Share via


AddAtID Method [Visio 2003 SDK Documentation]

Creates a new object with a specified ID in a collection.

objRet = object**.AddAtID**(id)

objRet     The new object added to the collection.

object     Required. An expression that returns an AccelTables, MenuSets, or ToolbarSets collection.

id     Required Long. The window context for the new object.

Version added

4.0

Remarks

The ID corresponds to a window or context menu. If the collection already contains an object at the specified ID, the AddAtID method returns an error.

Valid IDs are declared by the Visio type library in member VisUIObjectSets. Not all collections include an object for every possible ID.

Applies to | AccelTables collection | MenuSets collection | ToolbarSets collection

See Also | AddAt method | SetID property