删除自定义形状Visio 2016

时间:2017-06-27 17:19:49

标签: vba shape visio

我正在尝试将自定义形状放入我的开放Visio文档中,并将其链接到我从SQL数据库导入的数据。我将模板加载到Visio中。目前我可以在屏幕上删除矩形并链接它们。以下是我到目前为止的情况:

For i = 1 To 6

    Dim vsoDataRecordset As Visio.DataRecordset
    Dim vsoShape As Visio.Shape
    Dim intCount As Integer

    intCount = Visio.ActiveDocument.DataRecordsets.Count
    Set vsoDataRecordset = Visio.ActiveDocument.DataRecordsets(intCount)

    Set vsoShape = ActivePage.DrawRectangle(1, 3, 2, 1)

    vsoShape.LinkToData vsoDataRecordset.ID, i, True
Next i

1 个答案:

答案 0 :(得分:0)

希望David J Parker撰写的文章Creating a Schema from Visio External Data record sets可以提供帮助