Table of contents
TOC
Collapse the table of content
Expand the table of content

Master.DataGraphicDelete Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Deletes the Master of type visTypeDataGraphic from the Masters collection of the document.

Note This Visio object or member is available only to licensed users of Visio Professional 2013.

Syntax

expression . DataGraphicDelete

expression An expression that returns a Master object.

Return Value

Nothing

Remarks

The DataGraphicDelete method deletes the data graphic master and removes the data graphic from all shapes in the drawing to which it has been applied. The Master.Delete method deletes only the data graphic master, leaving data graphics based on the master and already applied to shapes in the drawing intact.

Calling the DataGraphicDelete method is the equivalent of right-clicking a data graphic in the Data Graphics task pane in the Microsoft Visio user interface and then clicking Delete on the context menu.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the DataGraphicDelete to delete a Master of type visTypeDataGraphic from the Masters collection of the active document. The data graphic master deleted in this example is named "Data Graphic." You can determine the name of a data graphic master by pausing your mouse over a data graphic thumbnail in the Data Graphics task pane.

Public Sub DataGraphicDelete_example() 

    Dim vsoMaster As Visio.Master 

    Set vsoMaster = ActiveDocument.Masters("Data Graphic")    
    vsoMaster.DataGraphicDelete 

End Sub
© 2018 Microsoft