Master property

Microsoft Visio Developer Reference

Master property

   Example   

Gets the master that is displayed in a window, returns the master from which the Shape object was created, or returns the master that contains the Layer object or Layers collection.

Version added

2.0

Syntax

objRet = object.Master

objRet

A Master object that represents the object's master.

object

Required. An expression that returns a Layer object, Layers collection, Shape object, or Window object.

Remarks

You can use the Type property of the Window object to determine whether the Window object shows a master. If the Window object does not show a master, the Master property raises an exception.

If the Window object shows a master that is open for editing, the master returned is the actual master being edited, not the temporary master that exists while the actual master is being edited.

If the Shape object is not an instance of a master, its Master property returns Nothing.

If the Shape object is in a group, its Master property is the same as the group's Master property.

If the Layer object or Layers collection is from a page rather than a master, its Master property returns Nothing.