ID Property
TOC
Collapse the table of content
Expand the table of content

Shape.ID Property (Visio)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Gets the ID of an object. Read-only.

expression .ID

expression A variable that represents a Shape object.

Return Value

Long

The ID of a shape is unique only within the scope of the page or master.

If a shape, page, master, or style is deleted, future objects in the same scope may be assigned the same ID. Therefore, persisting shape or style IDs in separate data stores is generally not as sound as persisting unique IDs using the UniqueID property.

For Shape objects, you can use the ID property with methods such as GetResults and SetResults to get or set many cell values at once, possibly cells in many different shapes. To do this, you must pass shape IDs to the methods. If you create shapes by using the DropMany method, the method returns the IDs of the shapes it creates to your program.

If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this property maps to the following types:

  • Microsoft.Office.Interop.Visio.IVShape.ID

Show:
© 2016 Microsoft