MatchByName property

Microsoft Visio Developer Reference

MatchByName property

See also   Example   

Determines how the application decides if a document master is already present when an instance of a master is dropped on the drawing page. It allows changes made to a document master to apply to new instances of the master, even if the instances are dragged from a stand-alone stencil file.

Version added

5.0

Syntax

intRet = object.MatchByName
object.MatchByName = intExpression

intRet

Integer. Non-zero if match by name is enabled; otherwise, zero (0).

object

Required. An expression that returns a Master object.

intExpression

Required Integer. Non-zero if match by name is enabled; otherwise, 0.

Remarks

Setting the MatchByName property is equivalent to selecting or clearing the Match master name on drop check box in the Master Properties dialog box (right-click the master, and then click Master Properties on the shortcut menu).

Suppose you create an instance of a master from a stencil in a document (producing a local copy of the master in that document), and then make modifications to the document master (such as changing its fill color). If the MatchByName property of the document master is False, then dragging the original master from the stand-alone stencil into the drawing creates an instance with the stand-alone master's attributes and produces a second document master. If the MatchByName property of the document master is True, then dragging the original master from the stand-alone stencil into the drawing creates an instance with the document master's attributes and doesn't produce a second document master.