我正在尝试将自定义形状放入我的开放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
答案 0 :(得分:0)
希望David J Parker撰写的文章Creating a Schema from Visio External Data record sets可以提供帮助