Share via


GraphicItem.Tag Property

Visio Automation Reference

Gets or sets a user-defined string expression that can store extra data related to your program. Read/write.

Aa342168.vs_note(en-us,office.12).gif  Note
This Visio object or member is available only to licensed users of Microsoft Office Visio Professional 2007.

Version Information
 Version Added:  Visio 2007

Syntax

expression.Tag

expression   An expression that returns a GraphicItem object.

Return Value
String

Remarks

Microsoft Office Visio makes no use of the Tag property, nor does its value appear anywhere in the user interface. The Tag property is intended to be used by developers to store additional information about a graphic item or a data graphic.

For example, you can assign a Tag property value to a particular graphic item as an identifier. Then, by writing a procedure that iterates through the GraphicItems collection and looks for a graphic item that has that specific Tag value, you can find the graphic item.

Aa342168.vs_note(en-us,office.12).gif  Note
Before you can set any property of a graphic item, you must use the Master.Open method to open a copy of the data graphic master that contains the graphic item for editing. When you are finished setting properties, use the Master.Close method to commit changes.

See Also