Master.BaseID property (Visio)

Returns a base ID for a master. Read-only.

Syntax

expression. BaseID

expression A variable that represents a Master object.

Return value

String

Remarks

A base ID is assigned to a master when it is created. When a master is copied, the copies all have the same base ID as the original master.

A Master object also has a UniqueID property. When a master is copied, the copy is assigned the same unique ID as the original master, and its base also ID remains the same as that of the original master. If the copy of the master gets changed, its unique ID changes its the base ID remains the same.

In addition, 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.

The only way to change a master's base ID is to use the NewBaseID property.

If you know the base ID of a master, you can use the following code to retrieve the master from the Masters collection of the active document:

'Retrieve the master whose BaseID value is 
'{0478DA94-1315-9876-8E4C-006523ABC9B2} 
Dim vsoMaster As Visio.Master 
Set vsoMaster = Visio.ActiveDocument.Masters("B{0478DA94-1315-9876-8E4C-006523ABC9B2}") 

If you know the base ID or the unique ID of a master, but are not sure which kind of ID it is, you can use the following code to retrieve the master from the Masters collection of the active document:

'Retrieve the master whose UniqueID or BaseID value is 
'{0478DA94-1315-9876-8E4C-006523ABC9B2} 
Dim vsoMaster As Visio.Master 
Set vsoMaster = Visio.ActiveDocument.Masters("A{0478DA94-1315-9876-8E4C-006523ABC9B2}")

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.