Master.UniqueID Property
Visio Automation Reference |
Returns the unique ID of a master. Read-only.
Version Information
Version Added: Visio 4.0
Syntax
expression.UniqueID
expression An expression that returns a Master object.
Return Value
String
Remarks
A Master object always has a unique ID. If you copy a master, the new master has the same unique ID as the original master (as well as the same base ID). However, if you subsequently change the copy, Visio assigns it a new unique ID, but its base ID remains the same.
Note that if you copy into a stencil a master that has the same unique ID as a master already in the stencil, Visio assigns a new unique ID to the copy.
For more information about the base ID, see the BaseID property.
You can determine a Master object's unique ID by using the following code:
Visual Basic for Applications |
---|
|
The value it returns is a string in the following form:
Visual Basic for Applications |
---|
|
To get a master if you know its unique ID, use Masters.Item(UniqueIDString) .
For example, you can use the following code to retrieve the master from the Masters collection of the active document:
Visual Basic for Applications |
---|
|
Alternatively, you can use the following code, which adds the letter "U" before the string to identify it as a unique ID:
Visual Basic for Applications |
---|
|
See Also