Master.DataGraphicDelete method (Visio)
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
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.